-
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
DoS in ‘ claimAuction() ’ function if an address maliciously reverts while receiving refund. #1924
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-1785
edited-by-warden
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Comments
c4-submissions
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
labels
Nov 13, 2023
141345 marked the issue as duplicate of #1632 |
141345 marked the issue as duplicate of #843 |
c4-pre-sort
added
duplicate-843
duplicate-486
and removed
duplicate-1632
duplicate-843
labels
Nov 15, 2023
141345 marked the issue as duplicate of #486 |
alex-ppg marked the issue as not a duplicate |
alex-ppg marked the issue as duplicate of #2006 |
c4-judge
added
duplicate-2006
duplicate-1785
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
and removed
duplicate-2006
labels
Dec 1, 2023
alex-ppg marked the issue as unsatisfactory: |
1 similar comment
alex-ppg marked the issue as unsatisfactory: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-1785
edited-by-warden
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/main/smart-contracts/AuctionDemo.sol#L104-L120
Vulnerability details
Impact
A malicious address can place a trivial bid and perform a DoS attack by reverting while receiving the refund.
Proof of Concept
Adam = Attacker
Adam places a trivial bid of 69 wei at the start of the auction from a contract that is designed to
revert when receiving ether.
When the auction eventually ends and the
claimAuction()
function is called by either the winner or Admin,The refunds and NFT transfer dont happen as expected.
Because Adam's contract reverts upon receiving the refund
thus creating a Denial of Service for all bidders involved.
This can be averted by preferring 'pull over push' pattern for withdrawals / refunds.
Tools Used
Manual Review, Foundry.
Recommended Mitigation Steps
Enforce 'pull over push' design pattern for withdrawals / refunds,
as it is more secure and flexible.
It allows users or external contracts to withdraw funds on their own initiative.
This way a DoS attack could be prevented.
Assessed type
DoS
The text was updated successfully, but these errors were encountered: