Skip to content

L-05: Owner Can Be Zero #430

@0xisk

Description

@0xisk

Source: OpenZeppelin Midnight - Compact Contracts Audit

Description

The Ownable contract claims to support experimental circuits to grant ownership to contract addresses. However, it authenticates against the left side of the owner, which corresponds to the public key side. Therefore, the experimental circuits cannot be used.

Moreover, this discrepancy can be used to bypass the non-zero owner validation by setting is_left to false and a non-zero (irrelevant) contract address. This will pass validation but the actual owner would still be the public key, which could be set to zero.

Recommendation

Consider allowing the assertOnlyOwner circuit to support contract addresses.

Metadata

Metadata

Assignees

Labels

auditIssues reported by an audit

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions