-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
executeWithdraw
may be blocked if any of the users are blacklisted from the baseToken
#1426
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
H-04
primary issue
Highest quality submission among a set of duplicates
🤖_55_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
sufficient quality report
This report is of sufficient quality
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
Comments
DadeKuma marked the issue as primary issue |
This was referenced May 18, 2024
Potential Denial-of-Service Attack on
AccountingManager
Contract through Blacklisted Addresses
#1356
Closed
This was referenced Jun 2, 2024
Malicious actor can stuck all funds on protocol by passing address(0) to
receiver
when deposit
#1044
Closed
Closed
High risk because the DOS can cause other fund to be stuck. There are multiple way to trigger the problem:
I consider these all share the same root cause of the deposit and withdrawal queue being blocking. |
This was referenced Jun 2, 2024
Closed
fix in commit c9e03316c7f30f5aebe88627fc296763f6105c31 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
H-04
primary issue
Highest quality submission among a set of duplicates
🤖_55_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
sufficient quality report
This report is of sufficient quality
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
Lines of code
https://github.com/code-423n4/2024-04-noya/blob/9c79b332eff82011dcfa1e8fd51bad805159d758/contracts/accountingManager/AccountingManager.sol#L428
Vulnerability details
https://github.com/d-xo/weird-erc20#tokens-with-blocklists
If a user whose address has been blocklisted is added to a
withdrawQueue
inside theAccountingManager
contract, all other users that are in that same queue will not be able to withdraw, as theexecuteWithdraw
function will revert when it tries to do[baseToken.safeTransfer](https://github.com/code-423n4/2024-04-noya/blob/main/contracts/accountingManager/AccountingManager.sol#L428)
call on the blocklisted address.Impact
A user who has been blocklisted can be added to a
withdrawQueue
to DoS the call of theexecuteWithdraw
function, effectively preventing all other user that are in that same queue from withdrawing, locking their assets inside the protocol.Proof of Concept
When
baseToken
has blocklisting functionality, and any user in the withdrawal queue is in the blocklist, it prevents all other users from making withdrawals.Place the following test in testFoundry/BlacklistableTokenPOC.t.sol and run it with the command
forge test --mt testBlacklistableERC20
Tools Used
Manual Review
Recommended Mitigation Steps
Validate that the receiver is not blacklisted before making the
ERC20::safeTransfer
call, whenever thebaseToken
has a contract level admin controlled address blocklist (e.g.USDC
,USDT
).Assessed type
ERC20
The text was updated successfully, but these errors were encountered: