Skip to content
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 role lockout #35

Open
code423n4 opened this issue Aug 3, 2022 · 1 comment
Open

Admin role lockout #35

code423n4 opened this issue Aug 3, 2022 · 1 comment
Labels
bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons valid

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-08-rigor/blob/b17b2a11d04289f9e927c71703b42771dd7b86a4/contracts/HomeFi.sol#L157-L167

Vulnerability details

Impact

The replaceAdmin() function in HomeFi.sol updates admin role address in one-step. If an incorrect address is mistakenly used then future administrative access or even recovering from this mistake is prevented because all onlyAdmin modifier functions require _msg.sender to be the incorrectly used admin address (for which private keys may not be available to sign transactions). In such a case, contracts would have to be redeployed.

Proof of Concept

https://github.com/code-423n4/2022-08-rigor/blob/b17b2a11d04289f9e927c71703b42771dd7b86a4/contracts/HomeFi.sol#L157-L167

Recommended Mitigation Steps

Suggest using a two-step process where the new admin address first claims ownership in one transaction and a second transaction from the new admin address takes ownership.

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Aug 3, 2022
code423n4 added a commit that referenced this issue Aug 3, 2022
@horsefacts
Copy link

Duplicate of #368

@zgorizzo69 zgorizzo69 added disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons labels Aug 9, 2022
@jack-the-pug jack-the-pug added duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax valid and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Aug 27, 2022
@jack-the-pug jack-the-pug removed the duplicate This issue or pull request already exists label Aug 31, 2022
@JeeberC4 JeeberC4 reopened this Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons valid
Projects
None yet
Development

No branches or pull requests

5 participants