Open c4-bot-5 opened 10 months ago
raymondfam marked the issue as insufficient quality report
raymondfam marked the issue as duplicate of #72
raymondfam marked the issue as not a duplicate
raymondfam marked the issue as primary issue
raymondfam marked the issue as sufficient quality report
rocketman-21 (sponsor) confirmed
MarioPoneder marked the issue as satisfactory
This rather fits the definition of High severity due to potential losses and assets being at direct risk.
MarioPoneder changed the severity to 3 (High Risk)
Selecting for report due to PoC.
MarioPoneder marked the issue as selected for report
Hi @MarioPoneder,
this issue is validated based on a check that the AuctionHouse
contract balance can be manipulated by extrernal donations to bypass this condition and mint the auctioned verbs NFT:
```solidity
if (address(this).balance < reservePrice) {
```
and this condition will only be true if the contract owner changed (increased) the reservePrice
during an active auction; so this is a result of an admin fault,
referring to issue #495:
this issue (and its duplicates) pointed to the adverse effects of changing AuctionHouse
parameters during an active auction, and these issues were invalidated as this is intended by design, quoting your reply on the issue:
Behaviour by desing and changes are queued by DAO, i.e. not effective immediately. Therefore, QA seems appropriate.
But even if the changes are going to pass the timelock first in order to take place; there's no guarantee that this would be done while there's no auctions, as starting auctions is manual and can be invoked by anyone and there's no check if there's any active auction before changing contract's parameters.
Also invalidating the root cause of this issue (which is pointed out by 495 and its duplicates) while validating its effect (this issue itself) is inconsistent,, since this issue is a result of increasing the reservePrice
during an active auction.
I kindly ask you to reconsider issue 495 and its duplicates, or the validity of this issue.
Thanks!
Thank you for pointing out this inconsistency.
After another review, it seems that there is no meaningful attack path without raising the reservePrice
inbetween.
@rocketman-21 Requesting your input.
I agree this would be more admin / dao fault.
ideally the dao would wait to update the reserve price to line up with the start of a new auction, to ensure some bids will come in. your call ultimately @MarioPoneder I implemented the fix in any case
Thanks for the input!
ideally the dao would wait to update the reserve price to line up with the start of a new auction
It's reasonable to assume that this is not always the case, therefore this group of issues remains valid. Going to re-check #495 and duplicate accordingly.
The root cause is the change of parameters mid-auction, while the usage of selfdestruct is "just" a very impactful attack path.
Hi @MarioPoneder
It's reasonable to assume that this is not always the case, therefore this group of issues remains valid.
I agree this issue being valid based on this comment, but I think it is a medium severity due to being dependant to external factors like the Dao changing the reserve price mid-auction.
Hi @MarioPoneder, I believe this issue remains of valid high severity.
I understand both sides, all valid points.
However, the severity is determined by the impact (highest of all duplicates) which can be categorized as theft/loss. Furthermore a change of reservePrice
which facilitates this attack path is rather solid than a hand-wavy hypothetical (to use the language of the C4 docs), therefore leaning towards High severity.
If I'm missing something, please point it out, but there are several points that I would like to raise:
reservePrice
is going to change (which, of course may happen), but changing reservePrice
during auction is itself unfair for people that are already participating in auction, in the first place, and such a change should be made when the contract is paused, so we are already assuming an owner's mistake.reservePrice
anyway. Even more - he has to do additional work of creating a contract and selfdestruct
ing it and the entire operation will cost him considerably more gas than when he simply created a higher bid.reservePrice
was ever going to be increased, it is only logical to do so when users are regularly paying more than the current reservePrice
. Otherwise, it wouldn't make any sense. And if we assume that it is the case (users are paying more than current reservePrice
), then it's unlikely that nobody will create a higher bid than the attacker, which makes the attack even more unlikely.X
days, all this attack does is to make it go with this reserve price one day longer. It's not a big difference between X
and X+1
.0
and instead it would get money for the NFT being auctioned (if that price was fine for X
days, then it's really not a tragedy for it to last 1 day longer). In fact, the attack benefits the protocol as it earns money that wouldn't have been acquired in a different scenario.So:
So, unless I'm missing something, this "attack" seems like not a threat, but in fact an opportunity for the protocol.
Thanks for all the input so far! Tagging @rocketman-21 since all the additional arguments here provide value for the sponsor.
agreed w/ @bart1e don't really see how this is a big problem / what the attacker stands to gain tbh, especially since the AuctionHouse will just get the funds anyways, and could retroactively pay the difference to the creator(s). def could be MED imho
Hi @MarioPoneder, I disagree with both @rocketman-21 and @bart1e, here's why:
Thanks again for all the input!
After having another review the of report, some duplicates and the comments, it seems that I have overestimated the impacts and likelihood.
Nevertheless, it's out of question that there is an underlying bug which impacts the intended functionality of the protocol, therefore Medium severity (as originally chosen by the Warden) is fair.
MarioPoneder changed the severity to 2 (Med Risk)
Lines of code
https://github.com/code-423n4/2023-12-revolutionprotocol/blob/main/packages/revolution/src/AuctionHouse.sol#L348 https://github.com/code-423n4/2023-12-revolutionprotocol/blob/main/packages/revolution/src/AuctionHouse.sol#L365-L368
Vulnerability details
Impact
Proof of Concept
For this attack to be possible it's necessary that the following happens in the shown order:
AuctionHouse::reservePrice
is increased to a value superior to the already placed bid.AuctionHouse::reservePrice
is called and the auction ends.selfdestruct
toAuctionHouse
the minimum necessary to haveaddress(AuctionHouse).balance
be greater or equal toAuctionHouse::reservePrice
._auction.amount
which is lower than the setreservePrice
.To execute the following code copy paste it into
AuctionSettling.t.sol
Tools Used
Manual Review.
Recommended Mitigation Steps
Execute the following diff at
AuctionHouse::_settleAuction
:Assessed type
Other