A critical vulnerability has been identified in the InheritanceManager contract's beneficiary management system. The contract allows adding address(0) as a beneficiary, which can lead to fund loss and contract control issues.
The vulnerability exists in the beneficiary management system:
Missing Zero Address Validation:
The addBeneficiery function lacks validation for address(0)
Allows adding the zero address as a valid beneficiary
Funds sent to address(0) are permanently lost
Can affect contract ownership transfer mechanisms
Test Demonstration Shows:
Owner can add address(0) as a beneficiary
When inheritance is triggered, funds are split with address(0)
Half of the contract's funds are permanently lost
Potential loss of contract control if address(0) is in slot 0
From the test:
The test proves this by:
Adding address(0) and a valid beneficiary
Funding the contract with 10e10 wei
Triggering inheritance mechanism
Demonstrating that:
Half of funds are sent to address(0) (permanently lost)
Half of funds are sent to the valid beneficiary
No way to recover funds sent to address(0)
Critical severity. The vulnerability allows:
Permanent loss of funds through transfers to address(0)
Potential loss of contract control
Disruption of inheritance mechanism
Unrecoverable state if address(0) is used in critical positions
Manual code review
Foundry test framework
Custom test cases demonstrating fund loss
State transition analysis
Add zero address validation:
Add safety checks for beneficiary management:
Validate all address inputs
Add checks for critical beneficiary positions
Implement recovery mechanisms
Enhance inheritance mechanism:
Skip zero addresses in fund distribution
Add validation for ownership transfer targets
Implement proper deadline reset in all conditions
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.