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

Forbidden withdrawals because of wrong clearingQuote setting #71

Closed
code423n4 opened this issue Nov 6, 2022 · 3 comments
Closed

Forbidden withdrawals because of wrong clearingQuote setting #71

code423n4 opened this issue Nov 6, 2022 · 3 comments
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate-252 partial-25 Incomplete articulation of vulnerability; eligible for partial credit only (25%)

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-11-size/blob/706a77e585d0852eae6ba0dca73dc73eb37f8fb6/src/SizeSealed.sol#L217

Vulnerability details

Impact

In finalize function clearingQuote may be set to type(uint256).max
Then checks atState() will fail in refund() and withdraw() functions and it will impossible to return money to bidders

Proof of Concept

  1. Seller calls reveal() function for finished auction with no finalizeData
  2. Malicious user calls finalize() with ``clearingQuote = type(uint256).max```
  3. Then checks atState(idToAuction[auctionId], States.Finalized) in refund() and withdraw() will fail

Tools Used

vs code

Recommended Mitigation Steps

check clearingQuote value

@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels Nov 6, 2022
code423n4 added a commit that referenced this issue Nov 6, 2022
@trust1995
Copy link

Low quality, not descriptive enough to be satisfactory.

@c4-judge
Copy link
Contributor

0xean marked the issue as duplicate of #252

@c4-judge
Copy link
Contributor

0xean marked the issue as partial-25

@c4-judge c4-judge added the partial-25 Incomplete articulation of vulnerability; eligible for partial credit only (25%) label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate-252 partial-25 Incomplete articulation of vulnerability; eligible for partial credit only (25%)
Projects
None yet
Development

No branches or pull requests

3 participants