code-423n4 / 2021-07-sherlock-findings

0 stars 0 forks source link

Missing non-zero address checks #135

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

shw

Vulnerability details

Impact

Adding non-zero address checks on the following function's parameters can help ensure the ownership of contracts is not lost or the contracts do not need to be redeployed if any of them is provided as zero accidentally.

Proof of Concept

Referenced code: GovDev.sol#L19-L23 NativeLock.sol#L19 ForeignLock.sol#L20

Recommended Mitigation Steps

Consider adding non-zero address checks on the parameters.

Evert0x commented 3 years ago

GovDev.sol#L19-L23 is used to eventually renounce the role, but maybe it makes sense to create a different function for that.