-
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
claimAuction
can be DoS'ed or abuse for gas-mining
#293
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-734
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
Comments
c4-submissions
added
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
labels
Nov 5, 2023
141345 marked the issue as duplicate of #1632 |
141345 marked the issue as duplicate of #843 |
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 #734 |
c4-judge
added
duplicate-734
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
labels
Dec 5, 2023
alex-ppg marked the issue as partial-50 |
c4-judge
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
and removed
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
labels
Dec 9, 2023
alex-ppg changed the severity to 3 (High Risk) |
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-734
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/main/smart-contracts/AuctionDemo.sol#L104
Vulnerability details
Impact
claimAuction
is called when auction ends by the highest bidder or admins (checked insideWinnerOrAdminRequired
modifier). The caller pays for gas to refund everyone who was out-bid and to transfer NFT to the highest bidder. An attacker can DoS this function by creating multiple small bids from contract withrecieve-fallback
function to mine gas.Description
For each user that needs to be refunded a call with value is made. Bids can be placed by contracts, and their
receive-fallback
can execute arbitrary code, including gas-mining operations.This is a common anti-pattern when implementing auctions, described in SWC-128, more comprehensive example of "auction-like" contract with the same issue described here: https://consensys.github.io/smart-contract-best-practices/development-recommendations/general/external-calls/#favor-pull-over-push-for-external-calls.
This issue is different from issue found in bot report
[H-01] Permanent DoS due to non-shrinking array usage in an unbounded loop
: we show that refunding inside claim function is a bad practice and might also lead to DoS.Tools Used
Manual analysis + bot report
Recommended Mitigation Steps
Use pull model for returning auction bids.
Assessed type
DoS
The text was updated successfully, but these errors were encountered: