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 Oct 1, 2023. It is now read-only.
sherlock-admin opened this issue
Mar 27, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
run
forge test -m test_exploit_Dos_DepositIntoQueueMultiple -vv
the result
Running 1 test for test/V2/Carousel/CarouselTest.t.sol:CarouselTest
[PASS] test_exploit_Dos_DepositIntoQueueMultiple() (gas: 1527471)
Test result: ok. 1 passed; 0 failed; finished in 24.15ms
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` labelHighA valid High severity issueRewardA payout will be made for this issue
jprod15
high
malicious user can break mintDepositInQueue making users loss fund
Summary
a malicious user can attack function mintDepositInQueue with a Dos making that users that deposit with id 0 loss a funds
Vulnerability Detail
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L98
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L117
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L334-L337
due that this operations is made in a cycle a malicious user can put a address of receiver that no handle erc1155 making reverted
therefore all transaction of mintDepositInQueue will reverte
add this function test in CarouselTest.t.sol
this contracts is part of test
run
forge test -m test_exploit_Dos_DepositIntoQueueMultiple -vv
the result
Impact
user loss fund
Code Snippet
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L98
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L117
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L334-L337
Tool used
Manual Review
Recommendation
could check at moment of deposit if receiver can handle erc 1555
Duplicate of #468
The text was updated successfully, but these errors were encountered: