Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

nonReentrant modifier does not work as expected

Summary

nonReentrant modifier does not revert when contract is reentered.

Vulnerability Details

We are storing value 1 in slot 0 and reading it from slot 1, so when we reenter the contract it will never revert as we never stored anything in slot 1.

Impact

This modifier is used on sendERC20 , sendETH and contractInteractions functions, these functions also have onlyOwner modifier, and owner is trusted, meaning he will not do any malicious activity but still bypassing reentrancy guards can be considered an issue, so in my opinion its a low severity issue as no funds are at risk.

Tools Used

Manaul Review

Recommendations

Make the following change in nonReentrant modifier

--- if tload(1) { revert(0, 0) }
+++ if tload(0) { revert(0, 0) }
Updates

Lead Judging Commences

0xtimefliez Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Wrong value in nonReentrant modifier

Support

FAQs

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