Missing zero address validations and contract existence are detected in smart contracts BridgeReth.sol
and BridgeSteth.sol
.
In BridgeReth.sol
the input constructor parameters rocketStorageAddress
and diamondAddr
are not checked if they are zero addresses or invalid contract addresses. Also, in BridgeSteth.sol
the input constructor parameter diamondAddr
is not checked if it is zero address or invalid contract address.
If rocketStorageAddress
in BridgeReth.sol
is not a valid address or is set to the zero address (0x0), any calls to rocketStorage.getAddress()
would likely fail, causing most of the contract's functions to revert.
If diamondAddr
in contracts BridgeReth.sol
and BridgeSteth.sol
is not a valid address or is set to the zero address (0x0), the contracts would be unusable. This is because the onlyDiamond
modifier is used to restrict access to certain functions (deposit
, depositEth
, withdraw
, unstake
) to the address stored in diamondAddr
. If this is set to the zero address, no one would be able to call these functions, rendering the contract unusable.
Manual review, VS Code
Add require
to validate the address parameters in constructors in BridgeReth.sol
and BridgeSteth.sol
contracts and add check to ensure that the provided addresses are valid smart contracts.
In BridgeReth.sol
:
In BridgeSteth.sol
:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.