DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: medium
Invalid

Missing zero address check can set diamond to zero

Vulnerability Details

M-02: Missing Zero Address Check for diamondAddr

In BridgeSteth.sol:24, there's a lack of validation for the diamondAddr parameter passed to the constructor. Specifically, there is no check to verify that diamondAddr is not the zero address.

constructor(ISTETH _steth, IUNSTETH _unsteth, address diamondAddr) {
...
diamond = diamondAddr;
...
}

Impact

If the zero address is accidentally set as the diamond address, it could result in loss of control over any logic or functionality that relies on the onlyDiamond modifier.

Tools Used

Manual Review

Recommendations

It is recommended to add a check that reverts the transaction if the zero address is passed as the diamondAddr parameter to the constructor.

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

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