Skip to content
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

Griefing of auctions and DoS #11

Closed
code423n4 opened this issue Nov 5, 2022 · 2 comments
Closed

Griefing of auctions and DoS #11

code423n4 opened this issue Nov 5, 2022 · 2 comments
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-237 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L415-L440
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L156-L159

Vulnerability details

Impact

  • Prevents bidders from participating in an auction
  • Prevents sellers from getting valid bids

Proof of Concept

There is a limit to number of bids per auction. The attacker can place bid and cancel bids recursively to fill up the bids array preventing the seller from getting any valid bids and having to redo the auction all over again. This can also be used to prevent users from being able to participate in an auction essentially creating a DoS attack.

Pseudo code:

contract Grief {
  function grief() {
    quoteToken.approve(sizeSealed, type(uint).max);
    for (uint i = 0; i < 1000; i++) {
      uint bidId = sizeSealed.bid(...);
      sizeSealed.cancelBid(auctionId, bidId);
    }
  }
}

Tools Used

Recommended Mitigation Steps

Delete cancelled bids from the bids array.

@code423n4 code423n4 added 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 labels Nov 5, 2022
code423n4 added a commit that referenced this issue Nov 5, 2022
@c4-judge
Copy link
Contributor

c4-judge commented Nov 9, 2022

0xean marked the issue as duplicate

@c4-judge
Copy link
Contributor

c4-judge commented Dec 6, 2022

0xean marked the issue as satisfactory

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Dec 6, 2022
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-237 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

3 participants