OwnerProxy
can call selfdestruct()
#67
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 disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
valid
Lines of code
https://github.com/code-423n4/2022-06-nested/blob/b4a153c943d54755711a2f7b80cbbf3a5bb49d76/contracts/governance/OwnerProxy.sol#L9-L36
Vulnerability details
Impact
OwnerProxy's selfdestruct
Proof of Concept
While only the owner (the timelock) can call the
execute
function, this doesn't mean it can't be compromised or phished to call a malicious_target
, which could contain a call toselfdestruct()
.As
selfdestruct()
would be a simple OPCODE in the context of theOwnerProxy
contract (which is the one usingdelegatecall()
inexecute()
), this would destroy the contract.This is a known bug in the community (see the Parity Multisig Hack): delegatecalls from contracts are dangerous.
Recommended Mitigation Steps
Consider making OwnerProxy a library instead of a contract to protect it from being selfdestructed and to further protect its state (that can also be manipulated as a contract)
Alternatively, consider deploying the OwnerProxy contract using CREATE2 so that the contract could be re-created at the same pre-computed address, if need be
The text was updated successfully, but these errors were encountered: