Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

Incorrect error selector used while reverting in mulWad and mulWadUp

Summary

MathMasters::mulWad and MathMasters::mulWadUp uses incorrect error selector while reverting, leading to incorrect error display to user.

Vulnerability Details

The vulnerability occurs due to the usage of incorrect error selectors in mulWad and mulWadUp function.
Both of them use 0xbac65e5b as the error selector but it is not the error selector of mentioned error function: MathMasters__MulWadFailed().

Impact

Reverts with incorrect error.

Tools Used

Manual Review

Recommendations

Change the error selector with the correct one as below:

+bytes4 sel = MathMasters__MulWadFailed.selector;
-mstore(0x40, 0xbac65e5b) // `MathMasters__MulWadFailed()`.
+mstore(0x40, sel)
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Wrong error selector

Support

FAQs

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