Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

Missing zero address check in `MondrianWallet::execute()`

Vulnerability Details

The execute function should include a check to ensure that the dest (destination address) is not the zero address. Sending a transaction to the zero address can lead to unexpected behavior or loss of funds.

Impact

Impact: Medium. Severity: High

Tools Used

Manual review

Recommendations

Zero Address Check: Add require(dest != address(0), "MondrianWallet__InvalidDestination"); to ensure the destination address is not zero.
This additional check enhances the security of the execute function by preventing transactions to the zero address, which could otherwise lead to loss of funds or other unintended consequences.

function execute(address dest, uint256 value, bytes calldata func) external requireFromEntryPointOrOwner {
+ require(dest != address(0), "MondrianWallet__InvalidDestination");
(bool success, bytes memory result) = dest.call{value: value}(func);
if (!success) {
assembly {
revert(add(result, 32), mload(result))
}
}
}
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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