The InheritanceManager:inherit
function implementation is incorrect for the first case scenario: the owner lost his keys and wants to reclaim this contract from beneficiaries slot 0
In this case, after the 90 days has passed, this function establish the new owner to msg.sender
, instead of the only beneficiary. So, if anyone is quicker enough to call this function before the real owner, is going to be able to claim the ownership of the smart contract.
A malicious Actor can claim the ownership of the smart contract.
Manual Review
Instead of setting the new owner to msg.sender
, change that to the only beneficiary, is this case -> beneficiaries[0]
.
As the owner, set a unique beneficiary.
Let the 90 days pass.
Call the InheritanceManager::inherit
with an attacker account.
Claim the ownership of the contract 😎.
Here is a piece of code that shows this workflow.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.