-
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
The winner of a certain auction may extort other participating users #1579
Labels
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
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-739
satisfactory
satisfies C4 submission criteria; eligible for awards
Comments
141345 marked the issue as duplicate of #245 |
141345 marked the issue as not a duplicate |
141345 marked the issue as duplicate of #1653 |
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 #1759 |
alex-ppg marked the issue as satisfactory |
alex-ppg changed the severity to 2 (Med Risk) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-739
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/hardhat/smart-contracts/AuctionDemo.sol#L104-L120
Vulnerability details
Impact
In the auctionDemo contract, the claimAuction function can be called by the winner or the administrator to transfer the NFT to the winner and return the ETH to the remaining users who have not yet cancelled the auction.
If the winner's address is a contract, the contract can perform a malicious rollback when receiving the NFT, locking many people's ETH in the contract and making it impossible to withdraw.
Malicious users can extort money through this kind of behavior.
Proof of Concept
Let's take a deep dive into the claimAuction function:
Note that if the statement
IERC721(gencore).safeTransferFrom(ownerOfToken, highestBidder, _tokenid);
occurs revert, the entire transaction will also fail to complete. Continuing to dive deeper into the safeTransferFrom function, you will find the following code:If a malicious contract is maliciously revert in it's onERC721Received callback function, the attack can be successfully completed.
Tools Used
Foundry And VsCode
Recommended Mitigation Steps
Use
try catch
statements to optimize NFTsafeTransferFrom
behaviorAssessed type
DoS
The text was updated successfully, but these errors were encountered: