-
Notifications
You must be signed in to change notification settings - Fork 7
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
Admin cannot burn rOUSG tokens from any account. #237
Comments
Consider QA. DoS is temporary at worst, |
0xRobocop marked the issue as primary issue |
0xRobocop marked the issue as insufficient quality report |
Hi @0xRobocop , I think this is valid. It's true the interface ISanctionsList {
function isSanctioned(address addr) external view returns (bool);
} |
3docSec marked the issue as satisfactory |
3docSec marked issue #32 as primary and marked this issue as a duplicate of 32 |
Hi @c4-judge @3docSec , I do not think this is a duplicate of #32. #32 only shows the admin cannot burn tokens after address is removed from KYC list. This only causes a temporary DoS at worst (like @0xRobocop said above), as admin can first add the address to KYC, burn the tokens, and then remove the address from KYC. The point is admin cannot burn tokens from sanctioned addresses, instead of un-KYC addresses. |
@YD-Lee please refrain from commenting on issues outside of the post-judging-QA period. While you wait for this timeframe, you can review the backstage guidelines that include this and many more guidelines you should follow to keep your backstage access. |
Hi @3docSec, Can you please help review this? I think @YD-Lee is correct to point out that:
So a valid issue has to point out both conditions or at least sanction condition. Thank you. |
Interesting point. In general, I would very much agree with you, but this specific case is a little different because the KYC and blocklists are checked together by the KYCRegistry. So among the #32 group, each and every finding that suggests bypassing the KYC check implicitly covers the blocklist case, and root causes having the same reasonable fix are treated as the same finding on C4. |
Lines of code
https://github.com/code-423n4/2024-03-ondo-finance/blob/4791cd1946f834f27addbc162c1817e897de7bf9/contracts/ousg/rOUSG.sol#L618-L640
Vulnerability details
Impact
The functionality intended to allow administrators to burn rOUSG tokens from any account fails when the account in question is either not KYC compliant or is on a sanctions list. This limitation undermines the admin's ability to manage tokens in a way that may be necessary for regulatory compliance, token supply adjustment, or other critical administrative functions.
Proof of Concept
In rOUSG contract, the
burn
function allows admin to burn tokens from any specified account.https://github.com/code-423n4/2024-03-ondo-finance/blob/4791cd1946f834f27addbc162c1817e897de7bf9/contracts/ousg/rOUSG.sol#L618-L640
When the
_burnShares
function is called, it has a_beforeTokenTransfer
hook that checks if thefrom
address (the account which token is burnt) is KYCed or in sanction list. If the account is not KYCed and in sanction list, then the call would revert.This setup inadvertently restricts the admin's ability to burn tokens, meaning break the functionality of the burn function
Tools Used
Manual
Recommended Mitigation Steps
In case of burning from admin, allow to burn without checking the KYC status of the account.
Assessed type
Token-Transfer
The text was updated successfully, but these errors were encountered: