Submitted by Trust, also found by _141345_, 0x1f8b, 0xdapper, c7e7eff, chaduke, codexploder, corerouter, cryptonue, fs0c, gz627, HE1M, hihen, joestakey, KIntern_NA, ktg, ladboy233, Lambda, minhtrng, Picodes, RaymondFam, RedOneN, rvierdiiev, simon135, skyle, slowmoses, TomJ, V_B, wagmi, and yixxas.
https://github.com/code-423n4/2022-11-size/blob/706a77e585d0852eae6ba0dca73dc73eb37f8fb6/src/SizeSealed.sol#L258-L263
https://github.com/code-423n4/2022-11-size/blob/706a77e585d0852eae6ba0dca73dc73eb37f8fb6/src/SizeSealed.sol#L157-L159
https://github.com/code-423n4/2022-11-size/blob/706a77e585d0852eae6ba0dca73dc73eb37f8fb6/src/SizeSealed.sol#L269-L280
Buyers submit bids to SIZE using the bid() function. Theres a max of 1000 bids allowed per auction in order to stop DOS attacks (Otherwise it could become too costly to execute the finalize loop). However, setting a max on number of bids opens up other DOS attacks.
In the finalize loop this code is used:
Note that pubKey is never validated. Therefore, attacker may pass pubKey = (0,0).
In ecMul, the code will return (1,1):
if (scalar == 0 || (point.x == 0 && point.y == 0)) return Point(1, 1);
As a result, we enter the continue block and the bid is ignored. Later, the bidder may receive their quote amount back using refund().
Another way to reach continue is by passing a 0 commitment.
One last way to force the auction to reject a bid is a low quotePerBase:
baseAmount is not validated as it is encrypted to sellers public key. Therefore, buyer may pass baseAmount = 0, making quotePerBase = 0.
So, attacker may submit 1000 invalid bids and completely DOS the auction.
Attacker may DOS auctions using invalid bid parameters.
Implement a slashing mechanism. If the bid cannot be executed due to users fault, some % their submitted quote tokens will go to the protocol and auction creator.
0xean (judge) commented:
RagePit (SIZE) commented:
RagePit (SIZE) commented:
