-
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
Blacklisted user can burn tokens in one case #3
Comments
0xEVom marked the issue as satisfactory |
0xEVom marked the issue as primary issue |
This can happen in 2 different variants:
In both cases the user can burn their tokens when whitelist mode is enabled for the transfer state. The likelihood of falling into this state is high because the Blacklist Manager and Whitelist Manager are intended to be different entities and as such we cannot guarantee that they will coordinate to maintain a clean separation of the blacklist/whitelist roles. If a user with a whitelist and blacklist role simultaneously, chose to burn their tokens in whitelist transfer state mode, it would have a positive impact on the protocol overall as there would be excess collateral in the protocol. We therefore believe that this issue should be marked as low as there is no incentive for a user to outright burn their tokens, in fact if a user does so, all other users in the protocol will benefit, without causing a negative impact. |
This may have a positive impact on the protocol overall and even be intentional, but it does break one of the provided invariants. The consequences of bypassing a whitelist go beyond the immediate state changes (cf. sanctions), which must also be factored into the severity. |
0xEVom marked the issue as selected for report |
@0xEVom! Thanks for your judging. I think this issue should be seen as QA based on the following C4 rule.
Both the BLACKLIST_MANAGER and WHITELIST_MANAGER are trusted roles; therefore, blacklisting a whitelisted user and whitelisting a blacklisted user are direct misuse of privileges. In README.md: All trusted roles in the protocol
I submitted this issue for QA as a consequence. |
Just to note that this was fixed in ethena-labs/ethena-usdtb-contest/pull/2 based off of a different qa finding which ensures that whitelist/blacklist roles are mutually exclusive. |
There is no misuse of privileges here. As per the sponsor's comment above, both BLACKLIST_MANAGER and WHITELIST_MANAGER would be acting as intended. It is the contract's inability to enforce the blacklisting functionality as designed (and as specified for this contest) that is an issue here. |
0xEVom marked issue #15 as primary and marked this issue as a duplicate of 15 |
Lines of code
https://github.com/code-423n4/2024-11-ethena-labs/blob/main/contracts/ustb/UStb.sol#L199
Vulnerability details
Finding description and impact
When the USTB token operates in
WHITELIST_ENABLED
mode, users who hold bothWHITELISTED
andBLACKLISTED
roles can still burn tokens, which violates expected behavior.Proof of Concept
As seen above, the check allows a whitelisted user to burn tokens even if they are also blacklisted. Since the
normal case
branch acknowledges that an account can hold bothWHITELISTED
andBLACKLISTED
roles, such users still have burning privileges, conflicting with one of the stated USTB invariants:Recommended mitigation steps
The text was updated successfully, but these errors were encountered: