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 May 26, 2023. It is now read-only.
github-actionsbot opened this issue
Feb 21, 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
Funds can be frozen due to refunding functionality DOS
Summary
There is no limit to the amount of deposits that can be made to a bounty. This could lead to a DOS when trying to get a refund, essentially freezing the funds forever.
Vulnerability Detail
Attacker could submit many 1 wei deposits with the same token to DOS the refund functionality.
This would create many depositIds.
When a funder calls refundDeposit() the function will revert because bounty.getLockedFunds() will have to iterate through all depositId and end up running out of gas.
Impact
No funder would be able to claim a refund and the funds would be forever frozen.
Have a universal minimum bounty funding amount so creating many depositId becomes expensive.
AND/OR
Have a limit to the number of depositId per bounty.
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
hake
high
Funds can be frozen due to refunding functionality DOS
Summary
There is no limit to the amount of deposits that can be made to a bounty. This could lead to a DOS when trying to get a refund, essentially freezing the funds forever.
Vulnerability Detail
Attacker could submit many 1 wei deposits with the same token to DOS the refund functionality.
This would create many
depositId
s.When a
funder
callsrefundDeposit()
the function will revert becausebounty.getLockedFunds()
will have to iterate through alldepositId
and end up running out of gas.Impact
No
funder
would be able to claim a refund and the funds would be forever frozen.Code Snippet
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/BountyCore.sol#L54
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/DepositManager/Implementations/DepositManagerV1.sol#L151-L172
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/BountyCore.sol#L333-L349
Tool used
Manual Review
Recommendation
Have a universal minimum bounty funding amount so creating many
depositId
becomes expensive.AND/OR
Have a limit to the number of
depositId
per bounty.Duplicate of #77
The text was updated successfully, but these errors were encountered: