In src/InheritanceManager.sol
, the withdrawInheritedFunds
function sends amountPerBeneficiary
to each beneficiary in a loop. However, if one of the beneficiaries intentionally reverts the transaction (e.g., via a fallback function), it will block the entire distribution, preventing all beneficiaries from receiving their share of the assets.
In InheritanceManager.sol#L236, the contract sends ETH or ERC20 tokens to each beneficiary using a passive distribution method. If a malicious beneficiary intentionally reverts, the entire loop fails, blocking payments to all beneficiaries.
Here is the affected code:
The following test case demonstrates how a malicious beneficiary can block the withdrawal process:
Funds Lockup: A malicious beneficiary can prevent all other beneficiaries from receiving their rightful share.
Denial of Service (DoS): Any beneficiary with a reverting fallback can block withdrawals indefinitely.
Broken Functionality: The inheritance process becomes unusable, as no funds can be distributed.
Manual code review
Foundry for Solidity testing
Change from Passive to Active Distribution:
Instead of forcing payment during the loop (passive model), allow each beneficiary to claim their portion (active model). This prevents one malicious actor from blocking others.
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.