Submitted by V_B, also found by 0x1f8b, cccz, hansfriese, ktg, M4TZ1P, neumo, zapaz, and V_B.
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L217
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L269
https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol#L44
There is a finalize function in the SizeSealed smart contract. The function traverses the array of the bids sorted by price descending. On each iteration, it calculates the quotePerBase. When this variable is calculated, the whole transaction may be reverted due to the internal logic of the calculation.
Here is a part of the logic on the cycle iteration:
Lets baseAmount == 0, then
According to the implementation of the FixedPointMathLib.mulDivDown, the transaction will be reverted.
A mallicious user may encrypt the message with baseAmount == 0, then the auction is impossible to finalize.
Any user can make a griffering attack to invalidate the auction.
Add a special check to the finalize function to prevent errors in cases when baseAmount is equal to zero:
0xean (judge) commented on duplicate issue #209:
Ragepit (SIZE) disagreed with severity on duplicate issue #209:
0xean (judge) replied:
For this contest, 29 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by 0x1f8b received the top score from the judge.
The following wardens also submitted reports: Aymen0909,
brgltd,
ajtra,
B2,
djxploit,
lukris02,
Deivitto,
c7e7eff,
RedOneN,
0xSmartContract,
Josiah,
trustindistrust,
cryptonue,
0xc0ffEE,
Trust,
simon135,
tnevler,
peanuts,
delfin454000,
slowmoses,
rvierdiiev,
shark,
Rahoz,
KingNFT,
aviggiano,
ReyAdmirado,
ctf_sec, and
RaymondFam
.
