The addBeneficiery function in the InheritanceManager contract lacks critical input validation, allowing zero addresses and duplicate beneficiaries to be added. This can lead to permanent fund loss and inconsistent distribution of assets.
In the InheritanceManager contract, the addBeneficiery function lacks essential validation checks when adding new beneficiaries to the estate:
The function does not validate whether the provided _beneficiary address is the zero address. If the zero address is added as a beneficiary, any funds transferred to this address during distribution will be permanently lost. There is no check to prevent the same address from being added multiple times to the beneficiaries array.
If the zero address is added as a beneficiary, funds sent to it during distribution are permanently and irrecoverably lost. Duplicate addresses artificially inflate the denominator in share calculations, leading to unfair distribution.
Consider using a mapping to track beneficiary status and Implement proper validation checks in the addBeneficiery function:
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.