-
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
DoS claimAuction()
and cancelAllBids()
Can Cause Fund Lockup
#170
Comments
claimAuction()
Can Cause Fund LockupclaimAuction()
and cancelAllBids()
Can Cause Fund Lockup
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 #1785 |
alex-ppg marked the issue as unsatisfactory: |
Thanks for judging @alex-ppg I believe this submission is incorrectly duped, it should be a valid dupe of #734 |
Hey @Henrychang26, thanks for the follow-up! The absence of a contract NoReceipt {
}
contract SendTest {
function sendFunds() external payable returns (bool) {
NoReceipt target = new NoReceipt();
(bool success, ) = address(target).call{value: msg.value}("");
return success;
}
} |
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/main/smart-contracts/AuctionDemo.sol#L104
https://github.com/code-423n4/2023-10-nextgen/blob/main/smart-contracts/AuctionDemo.sol#L134
Vulnerability details
Impact
An attacker can intentionally DoS the
claimAuction()
function, resulting in a potential fund lockup withinAuctionDemo.sol
.Proof of Concept
This vulnerability allows bidders to effectively disable or DoS the
claimAuction()
function, which can lead to funds becoming stuck in theAuctionDemo.sol
. Only auction winners and admins have permission to executeclaimAuction()
. This function serves the purpose of transferring NFT to the winner while paying the original owner's funds. Additionally, it iterates throughauctionInfoStru
to refund participants who didn't win.Here is how the grief/DoS works:
receive()
orfallback()
.participateToAuction()
.claimAuction()
.claimAuction()
function will revert, as the smart contract created by the attacker is incapable of receiving native tokens during the refund process withinclaimAuction()
.cancelAllBids()
can also be DoS as it has similar refund logic.Tools Used
Manual Review
Recommended Mitigation Steps
Consider creating a different function to handle refunds rather than everything in
claimAuction()
. It is likely to run out of gas anyways.Assessed type
DoS
The text was updated successfully, but these errors were encountered: