The InheritanceManager::withdrawInheritedFunds
function is callable by anyone, not just beneficiaries. This allows an attacker or any external party to force the distribution of funds to beneficiaries, even if they are not ready or willing to receive the funds. While beneficiaries can send the funds back to the contract, this results in unnecessary gas costs and disrupts the intended workflow of the contract.
Place the test below in ./test/InheritanceManagerTest.t.sol
file:
Lost of funds due to unnecessary gas costs and loss of control over the timing of fund distribution.
Manual Review
Foundry
Add the InheritanceManager::onlyBeneficiaryWithIsInherited
modifier to restrict access to the beneficiaries only.
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.