-
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
Gas griefing / Bombing in claimAuction #843
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-734
satisfactory
satisfies C4 submission criteria; eligible for awards
Comments
c4-submissions
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
labels
Nov 10, 2023
c4-pre-sort
added
the
primary issue
Highest quality submission among a set of duplicates
label
Nov 15, 2023
141345 marked the issue as primary issue |
This was referenced Nov 15, 2023
Closed
Closed
Closed
This was referenced Nov 15, 2023
Closed
141345 marked the issue as duplicate of #486 |
c4-pre-sort
added
duplicate-486
and removed
primary issue
Highest quality submission among a set of duplicates
labels
Nov 16, 2023
alex-ppg marked the issue as not a duplicate |
alex-ppg marked the issue as duplicate of #1782 |
c4-judge
added
duplicate-1782
duplicate-734
satisfactory
satisfies C4 submission criteria; eligible for awards
and removed
duplicate-1782
labels
Dec 1, 2023
alex-ppg marked the issue as satisfactory |
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
satisfactory
satisfies C4 submission criteria; 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
After the auction ends :
Proof of Concept
This can be executed in a similar manner by both the winner (via
onERC721Received
) or a bidder (viareceive / fallback
) but I will only focus on the latter in the tests.The attacker can create one or multiple low value bids from a contract that either consumes all forwarded gas or returns/reverts with an oversized data (to make the caller consume gas storing it in memory) when its fallback is triggered.
Test Setup
Init
forge init --no-git --force
foundry.toml config
Test
Traces
Tools Used
Manual Review
Recommended Mitigation Steps
transferFrom
instead ofsafeTransferFrom
to send the NFT to the winnerReferences
Assessed type
DoS
The text was updated successfully, but these errors were encountered: