Closed c4-submissions closed 12 months ago
bot race known issue H-01
141345 marked the issue as insufficient quality report
141345 marked the issue as primary issue
alex-ppg marked the issue as duplicate of #2038
alex-ppg marked the issue as unsatisfactory: Out of scope
alex-ppg marked the issue as unsatisfactory: Out of scope
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L104
Vulnerability details
Impact
Due to the possibility of making 1 wei bids. Increasing the value of
auctionInfoData[_tokenid].length
is fairly accessible & could permanently lock users' ether & make the winning bidder unable to claim his nft, due to the function call consistently reverting. The function bellow creates a newBid each time the msg.value is higher than the last. So even bids done all by 1 address, will make new instances in theauctionInfoData
array.Here the claimAuction function makes use of the list's length, in order to transfer the nft to the highest bidder & repay other bidders with their ether. Purposefully inflating this list, will guarantee this function to fail.
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
Tools Used
Foundry
Recommended Mitigation Steps
Using loops for any
.call{}()
orsafeTransfer()
is not recommended by regular security standards. In order to avoid misuse or MEV even possibilities id highly suggest a router contract for users to interact with more safely, instead of trying to have the core functionalities cater to users.Assessed type
DoS