Closed code423n4 closed 1 year ago
Seller can theoretically suffer from abuse if they finalize an auction where malicious buyers bid with nonexisting tokens. However, only seller can be impacted negatively, and it requires serious negligence on their part.
Yea, there are some serious pre-conditions for this to occur, but could see it being M. Will leave open for sponsor review.
0xean marked the issue as primary issue
However, only seller can be impacted negatively, and it requires serious negligence on their part.
Buyer can be impacted as well, if malicious sellers decides to make this an attack vector. See https://github.com/code-423n4/2022-11-size-findings/issues/48
Incredibly unlikely but confirming as Medium given the good argument in #48
RagePit marked the issue as sponsor confirmed
0xean marked the issue as satisfactory
captainmangoC4 marked issue #48 as primary and marked this issue as a duplicate of 48
Lines of code
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L163 https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L327 https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L351 https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L381 https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L439
Vulnerability details
Impact
Not checking for token existence is a know issue for Solmate. This can cause unexpected contract functionality for transfers implemented in
SizeSealed
. Note that this might not be a problem forbaseToken
due to the check implemented in L103. However, this can lead to issues forquoteToken
.Proof of Concept
createAuction()
with aquoteToken
in which the address doesn't contain codebid()
,finalize()
,refund()
,withdraw()
andcancelBid()
will not revert and will result in silent failures.https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L163
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L327
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L351
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L381
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L439
Recommended Mitigation Steps
Check if
baseToken
, and most importantly ifquoteToken
, contain code when creating an auction.