20,000 USDC
View results
Submission Details
Severity: low
Valid

Missing address(0) checks in Ownable.sol

Vulnerability Details

The constructor() function lacks zero address checks on owner addresses, which could potentially lead to unintended consequences. If, by mistake, the zero address is set as a valid owner address, it could wrongly validate any invalid signature as a whitelisted address.

14: constructor(address _owner) {
15: owner = _owner;
16: emit OwnershipTransferred(address(0), _owner);
17: }

Ownable.sol#L14-L17

Tools Used

VSCode

Recommendations

It is crucial to include zero address checks for owner addresses to prevent the aforementioned issues.

constructor(address _owner) {
+ require(_owner != address(0), "address(0)")
owner = _owner;
emit OwnershipTransferred(address(0), _owner);
}

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.