-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Reentry Protection in 'emergencyWithdraw' function #2020
Comments
141345 marked the issue as duplicate of #2039 |
141345 marked the issue as duplicate of #51 |
141345 marked the issue as not a duplicate |
141345 marked the issue as insufficient quality report |
admin func |
The Warden specifies that either a re-entrancy protection measure or the CEI pattern should be followed in the emergency function referenced, however, the emergency function does not perform any state changes (apart from an event's emission) after the native transfer and its behaviour cannot be influenced by a re-entrancy. As such, I consider this exhibit invalid. |
alex-ppg marked the issue as unsatisfactory: |
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/main/smart-contracts/MinterContract.sol#L461
Vulnerability details
Ensure that all state changes in
emergencyWithdraw
are done before the externalcall
to prevent reentrancy attacks. The function is vulnerable to reentrancy attacks due to the use of .call{value: balance}(""). This can be mitigated by adding a reentrancy guard.-Poc:
Assessed type
Reentrancy
The text was updated successfully, but these errors were encountered: