Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

Incorrect implementaion mutex lock used in `ChristmasDinner::nonReentrant` modifier

Summary :

The locked variable used in the nonReentrant modifier is never set to true before the function execution, making the mutex ineffective.

Vulnerability Details :

The incorrect mutex implementation in nonReentrantmodifier leads to reentrancy attacks possible which drains the contract balance.

Impact :

High

Tools Used :

Manual Review

Recommendations :

modifier nonReentrant() {
require(!locked, "No re-entrancy");
+ locked = true;
_;
locked = false;
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

mutex lock incomplete

Support

FAQs

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

Give us feedback!