-
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
Existing minter/operator will not be able to revoke newly proposed addresses #53
Comments
The report is valid, although the severity is considered |
The Warden has identified that mintership proposals cannot be revoked and will persist throughout role transfers if the role ever returns to the same account that made the proposals. While the behavior is indeed non-standard, I do not foresee a medium-risk vulnerability arising from what is described as the persistence of role proposals, which is limited by the fact that the proposals are inherently attached to the proposer. As such, I believe a QA (L) ruling is more appropriate. |
alex-ppg changed the severity to QA (Quality Assurance) |
alex-ppg marked the issue as grade-b |
Hey @alex-ppg, thanks for your response! Here is why I believe this issue is of Medium-severity:
Please re-consider this issue, thank you! |
Hey @mcgrathcoutinho, thank you for your PJQA contribution! After reviewing your feedback, I am inclined to retain my original ruling on this submission. The precise exploit scenario involves:
I believe that, by all accounts, the above execution flow (which is the only one this exhibit could have an impact with) is of an extremely low likelihood due to the malicious Actor B having had ownership in the past and thus the opportunity to cause mischief without going through the elaborate vulnerability submitted. I commend you for identifying the vulnerability as it is important to address, however, I cannot argue that it is of any risk greater than QA (L). |
Hi @alex-ppg, thank you for the feedback on my comment! One of my main reasoning was that this extremely low likelihood would be amplified when multiple instances of these contracts are deployed by devs/external parties using the deployers. This imo would balance out the extremely low likelihood and turn it into a rather low likelihood scenario + the high impact, thus posing a Medium-risk vulnerability. Pardon me for commenting after PJQA. I hope this observation on the likelihood and coupling it with the high impact it poses, helps in determining the severity. Thank you! |
Lines of code
https://github.com/code-423n4/2024-08-axelar-network/blob/4572617124bed39add9025317d2c326acfef29f1/interchain-token-service/contracts/utils/Minter.sol#L40
Vulnerability details
Summary
Existing minters/operators in ITS have the ability to propose mintership or operatorship to another address by calling proposeMintership(). The proposed address can then accept the ownership of the minter/operator role by calling acceptMintership(). This two-step ownership change mechanism has been introduced to mitigate a role from being lost or compromised in the future similar to how OZ's Ownable2Step implementation works.
The issue is that it is not be possible for the current minter/operator to revoke a proposed mintership/operatorship. This would be an issue in the following scenarios:
In addition to scenarios 1,2 and 5, we are particularly interested in scenarios 3 and 4. In these specific scenarios, although the ownership of the role was transferred multiple times, the address B (while being a non-priveleged actor in the system) still retained the power to steal mintership/operatorship from address A. This is a privilege escalation issue since A did not approve/propose B to take the role in the new context i.e. after A regained the ownership of the role either from C (as seen in scenario 4) or B (as seen in scenario 3).
Since Minter.sol and Operator.sol are inherited in ITS, the main contracts that would be affected are:
Proof of Concept
We'll be looking at Minter.sol here though the same also applies to Operator.sol for the operator role.
key
. This key represents the proposal from address A to B.Now if scenarios 1,2 or 5 occur, the current minter would run into the issue of not being able to revoke the proposed mintership to address B due to missing functionality to do so.
Let's look at scenario 3. Let's say after proposing address B, address A decides to transfer the role directly to B for reasons such as B takes too long to accept or there needs to be an immediate switch from A to B. In this case, the current minter A calls function transferMintership().
Tools Used
Manual Review
Recommended Mitigation Steps
This would require two fixes:
Implement a function that allows the current minter to revoke a proposed mintership. For example, minters are proposed with 0001 in binary at storage location
key
. Consider performing an AND operation with the value stored atkey
i.e. 0001 or just simply setkey
to 0.To deal with scenario 3, consider calling _setProposedRoles(fromAccount, toAccount, 0); while the transfer occurs in RolesBase.sol such that any proposed mintership from the "fromAccount" to "toAccount" is cleared.
Assessed type
Governance
The text was updated successfully, but these errors were encountered: