You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
sherlock-admin opened this issue
Dec 1, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
function _createAuction() is called after old auctions is settled. the issue is that code tires to mint new token by calling token.mint() and if that call reverts then code pauses the Auction. attacker can send low gas amount in the call and make the call to mint revert because of OOG and then Auction contract will pause the auction operations.
if Auction is paused then tokens won't be minted and Founders won't receive their vesting allocations. for example if a founders vesting time was for 1 week and auction time was for 1 day, then that founder expect to receive 7 NFT tokens in his vesting time, but attacker can cause force pause between auctions and make the funder to receive less NFT, also the pause will block the core functionality of the Auction, so I believe this is a High issue.
Vulnerability Detail
This _createAuction() code, as you can see if token.mint() reverts, then auction will be paused.
/// @dev Creates an auction for the next tokenfunction_createAuction()privatereturns(bool){// Get the next token available for biddingtrytoken.mint()returns(uint256tokenId){// Store the token idauction.tokenId=tokenId;
..........
..........
..........}catch{// Pause the contract if token minting failed_pause();returnfalse;}
because code pauses the auction even if the call reverted because of the OOG, so attacker can send low gas and cause OOG in the mint execution and pause the Auction. This is the POC:
let's assume the Token.mint() need 30K gas.
let's assume settleCurrentAndCreateNewAuction() execution until Token.mint() line requires 100K gas.
when an auction is finished attacker would frontrun others and would call settleCurrentAndCreateNewAuction() with 120K gas.
function settleCurrentAndCreateNewAuction() will run until Token.mint() and it would send less than 20K gas to the mint function.
mint call will revert and the catch part will be executed and would pause the Auction to pause.
attacker was able to pause the Auction while pausing is only for Founder level access or incase of the Token contract doesn't allow minting.
because founders receive their vesting tokens based on expire time so it's essential that auctions are executed and tokens are minted so they receive their token. if auction is paused then founders will receive less tokens.
Impact
attacker can manipulate Auction mechanism and pause the auction.
sherlock-admin2
changed the title
Skinny Frost Puppy - attacker can force pause the Auctions
unforgiven - attacker can force pause the Auctions
Dec 13, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
unforgiven
high
attacker can force pause the Auctions
Summary
function
_createAuction()
is called after old auctions is settled. the issue is that code tires to mint new token by callingtoken.mint()
and if that call reverts then code pauses the Auction. attacker can send low gas amount in the call and make the call to mint revert because of OOG and then Auction contract will pause the auction operations.if Auction is paused then tokens won't be minted and Founders won't receive their vesting allocations. for example if a founders vesting time was for 1 week and auction time was for 1 day, then that founder expect to receive 7 NFT tokens in his vesting time, but attacker can cause force pause between auctions and make the funder to receive less NFT, also the pause will block the core functionality of the Auction, so I believe this is a High issue.
Vulnerability Detail
This
_createAuction()
code, as you can see iftoken.mint()
reverts, then auction will be paused.because code pauses the auction even if the call reverted because of the OOG, so attacker can send low gas and cause OOG in the mint execution and pause the Auction. This is the POC:
Token.mint()
need 30K gas.settleCurrentAndCreateNewAuction()
execution untilToken.mint()
line requires 100K gas.settleCurrentAndCreateNewAuction()
with 120K gas.settleCurrentAndCreateNewAuction()
will run untilToken.mint()
and it would send less than 20K gas to the mint function.catch
part will be executed and would pause the Auction to pause.because founders receive their vesting tokens based on expire time so it's essential that auctions are executed and tokens are minted so they receive their token. if auction is paused then founders will receive less tokens.
Impact
attacker can manipulate Auction mechanism and pause the auction.
Code Snippet
https://github.com/sherlock-audit/2023-09-nounsbuilder/blob/db232c649b425c36f5a93607c95cfdf0e5962b2f/nouns-protocol/src/auction/Auction.sol#L292-L330
Tool used
Manual Review
Recommendation
make sure there is enough gas left when calling mint() function or doesn't pause when call revered with no error.
Duplicate of #243
The text was updated successfully, but these errors were encountered: