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

No Transfer Ownership Pattern #249

Closed
code423n4 opened this issue Sep 19, 2022 · 2 comments
Closed

No Transfer Ownership Pattern #249

code423n4 opened this issue Sep 19, 2022 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists old-submission-method QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/PartyDAO/party-contracts-c4/blob/3896577b8f0fa16cba129dc2867aba786b730c1b/contracts/party/PartyGovernance.sol#L458-L469

Vulnerability details

Impact

The current host transfer process involves the current host calling abdicate().
This function checks the new host is not the zero address and proceeds to write the new host's address into the governance's state variable.
If the nominated EOA account is not a valid account, it is entirely possible the owner may accidentally transfer ownership to an uncontrolled account, breaking all functions with the onlyHost() modifier.

Tools Used

Manual review

Recommended Mitigation Steps

implement a two step process where the controller nominates an account and the nominated account needs to call an acceptController() function for the transfer of controller to fully succeed. This ensures the nominated EOA account is a valid and active account.

@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 old-submission-method labels Sep 19, 2022
code423n4 added a commit that referenced this issue Sep 19, 2022
@merklejerk merklejerk added the duplicate This issue or pull request already exists label Sep 22, 2022
@merklejerk
Copy link
Collaborator

Duplicate of #226

@merklejerk merklejerk marked this as a duplicate of #226 Sep 22, 2022
@HardlyDifficult
Copy link
Collaborator

Downgrading to QA and merging with #248

@HardlyDifficult HardlyDifficult added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Oct 5, 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 duplicate This issue or pull request already exists old-submission-method QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

3 participants