-
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
payable().call
can be used to DOS AuctionDemo.claimAuction
#1632
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
duplicate-1785
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Comments
c4-submissions
added a commit
that referenced
this issue
Nov 13, 2023
141345 marked the issue as primary issue |
This was referenced Nov 14, 2023
Closed
Closed
Closed
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 #2006 |
alex-ppg marked the issue as unsatisfactory: |
1 similar comment
alex-ppg marked the issue as unsatisfactory: |
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
duplicate-1785
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L113
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L116
Vulnerability details
Impact
After the auction,
AuctionDemo.claimAuction
will be called to transfer token to the highest bidder, and send ETH to the token owner, and other bidders by callingpayable().call
, but sincepayable().call
can be reverted if the receiver has a fallback function that will revert when receives ETH.In such case, the whole function will be reverted, and all the bidders will lost their ETH.Proof of Concept
AuctionDemo.claimAuction uses
payable().call
to send ETH to the token owner and other bidders in a for-loop, if the ETH receiver has fallback function with revert inside, the whole for-loop will be reverted. and none of the bidders can get their ETH back.For the attacker, he can launch the attack by front-run all other bidders's tx, and call
AuctionDemo.participateToAuction
with 1 wei ETHTools Used
VIM
Recommended Mitigation Steps
Using WETH instead of ETH
Assessed type
DoS
The text was updated successfully, but these errors were encountered: