Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

giraffe - Malicious DOS by pausing contract #306

Closed
sherlock-admin opened this issue Dec 1, 2023 · 2 comments
Closed

giraffe - Malicious DOS by pausing contract #306

sherlock-admin opened this issue Dec 1, 2023 · 2 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented Dec 1, 2023

giraffe

medium

Malicious DOS by pausing contract

Summary

Due to EIP150 introduction of the 63/64 gas rule, it is possible to DOS the Auction.sol by repeatedly pausing it. This is done through providing the correct amount of gas when calling settleCurrentAndCreateNewAuction() that would cause _createAuction -> token.mint() to fail.

Vulnerability Detail

Same bug from previous contest remains unfixed, and is not listed as a known issue:
https://code4rena.com/reports/2022-09-nouns-builder#m-15-malicious-pausing-the-contract
Essentially, _createAuction does a try-catch to call token.mint(). If the try call fails due to insufficient gas, the catch block is triggered which pauses the contract.

The bug is exploitable if token.mint() uses more than 1.5 mil of gas because 1.5mil / 64 is > 20,000 which is the amount of gas needed to pause the contract. This is achievable when roughly 20 tokens are being minted to founders.

Impact

As settleCurrentAndCreateNewAuction() can be called by anyone, an attacker can potentially keep pausing the auction contract, which requires a DAO vote to call unpause() causing major inconvenience and possibly permanent DOS of the auction.

Code Snippet

https://github.com/sherlock-audit/2023-09-nounsbuilder/blob/main/nouns-protocol/src/auction/Auction.sol#L294

Tool used

Manual Review

Recommendation

Before calling token.mint() check that sufficient gas being forwarded so that the mint will not fail due to a lack of gas. This could be stored in a minGas variable.

Duplicate of #243

@github-actions github-actions bot closed this as completed Dec 6, 2023
@github-actions github-actions bot added the Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label label Dec 6, 2023
@sherlock-admin2 sherlock-admin2 changed the title Bitter Crepe Rattlesnake - Malicious DOS by pausing contract giraffe - Malicious DOS by pausing contract Dec 13, 2023
@sherlock-admin2 sherlock-admin2 added Non-Reward This issue will not receive a payout and removed Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Dec 13, 2023
@giraffe0x
Copy link

Request to escalate.

Medium finding in previous C4 contest but un-fixed. Past audit findings not excluded under known issues.

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Dec 14, 2023

Escalate

You've deleted an escalation for this issue.

@sherlock-admin sherlock-admin added Escalated This issue contains a pending escalation and removed Escalated This issue contains a pending escalation labels Dec 14, 2023
@Czar102 Czar102 added the Medium A valid Medium severity issue label Dec 21, 2023
@sherlock-admin sherlock-admin added Reward A payout will be made for this issue and removed Non-Reward This issue will not receive a payout labels Dec 21, 2023
@sherlock-admin2 sherlock-admin2 added the Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label label Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

4 participants