code-423n4 / 2022-09-party-findings

2 stars 0 forks source link

No Transfer Ownership Pattern #249

Closed code423n4 closed 1 year ago

code423n4 commented 2 years ago

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.

merklejerk commented 1 year ago

Duplicate of #226

HardlyDifficult commented 1 year ago

Downgrading to QA and merging with #248