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
sunsetCollection will not execute when a listing exists with very large created parameter
Summary
collectionShutdown calls shutdown collection when the collection has to be removed from locker.sol
However it checks if pending listings exist and even if locker is paused, if a listing had very high created time, it'll not be removed and listingCount will stay non-zero
This will permanently DOS sunsetCollection from ever being called.
The issue comes where a listing cannot be forcibly removed when createListings is called with an impossible to reach value for created parameter for the block.timestamp
This causes Listings count to always be non-zero effectively DOSing the sunsetCollection method
createListings with a listing of created parameter very higher than block.timestamp is called
External pre-conditions
No response
Attack Path
sunsetCollection is attempted to be called from CollectionShutdown but fails as the listingCount for the collection will always be non-zero
Impact
The collection can never be sunset
PoC
No response
Mitigation
have a limit check for the collection listing created or have a method to forcibly remove a listing from Listings.sol
The text was updated successfully, but these errors were encountered:
sherlock-admin2
changed the title
Glorious White Cyborg - sunsetCollection will not execute when a listing exists with very large created parameter
ajayss - sunsetCollection will not execute when a listing exists with very large created parameter
Oct 9, 2024
ajayss
Medium
sunsetCollection will not execute when a listing exists with very large created parameter
Summary
collectionShutdown
calls shutdown collection when the collection has to be removed from locker.solHowever it checks if pending listings exist and even if locker is paused, if a listing had very high created time, it'll not be removed and listingCount will stay non-zero
This will permanently DOS
sunsetCollection
from ever being called.Root Cause
https://github.com/sherlock-audit/2024-08-flayer/blob/main/flayer/src/contracts/utils/CollectionShutdown.sol#L241
https://github.com/sherlock-audit/2024-08-flayer/blob/main/flayer/src/contracts/Listings.sol#L142
The issue comes where a listing cannot be forcibly removed when
createListings
is called with an impossible to reach value forcreated
parameter for the block.timestampThis causes Listings count to always be non-zero effectively DOSing the
sunsetCollection
methodInternal pre-conditions
createListings
with a listing ofcreated
parameter very higher than block.timestamp is calledExternal pre-conditions
No response
Attack Path
sunsetCollection
is attempted to be called fromCollectionShutdown
but fails as thelistingCount
for the collection will always be non-zeroImpact
The collection can never be sunset
PoC
No response
Mitigation
have a limit check for the collection listing created or have a method to forcibly remove a listing from
Listings.sol
The text was updated successfully, but these errors were encountered: