Auction winner can maliciously DoS the claim process #1545
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/smart-contracts/AuctionDemo.sol#L112
Vulnerability details
Description
When the auction has ended and winner wants to claim their token,
claimAuction
is called to transfer the token by callingsafeTransferFrom
.However ERC721 token has callback which can be called from receiver and this can be used maliciously to DoS the claim process. As result owner won’t be able to receive their highestBid amount.
PoC
Here
signers.addr2
deploys contract that reverts whenonERC721Received
is called. By running the PoC code, you can see the revert log as follows.Recommended Mitigation Steps
Use try-catch statement to handle revert from the callback.
Assessed type
DoS
The text was updated successfully, but these errors were encountered: