Closed thebrittfactor closed 1 year ago
For transparency, due to submission issues, the warden provided this submission prior to audit close.
141345 marked the issue as duplicate of #1453
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/main/hardhat/smart-contracts/AuctionDemo.sol#L60
Vulnerability details
Impact
When the items of
auctionInfoData
array is sufficiently high, claimAuction, cancelAllBids(), returnHighestBid() will all not be able to be called due to the block gas limit rendering all funds locked and auction unusable.auctionInfoData can only ever be add to and thus will always increase. This array will naturally increase as new bids are made.
Notice an attacker can simply send additional 1 WEI worth of ETH to pass the required checks to creating new Bids, cancel bid to get funds back and preform steps continually to maliciously increase array size with lossing bigged funds.
Proof of Concept
AuctionDemo:participateToAuction() where newBid can be added to auctionInfoData and grow indefinitely
Example function that would break
Tools Used
Visual Studio Code
Recommended Mitigation Steps
Consider modifying the newBids creation approach
Assessed type
DOS