The onlyBeneficiaryWithIsInherited modifier in InheritanceManager.sol uses an incorrect loop condition, causing potential out-of-bounds array access and reverting legitimate beneficiary calls.
The modifier iterates with i < beneficiaries.length + 1, allowing i to reach beneficiaries.length. Accessing beneficiaries[i] at this index exceeds the array bounds, triggering a runtime error. This occurs even for valid beneficiaries, blocking critical functions like buyOutEstateNFT and appointTrustee.
Beneficiaries cannot execute key functions, breaking core inheritance logic. Malicious actors could exploit this to block inheritance claims.
Manual code review.
Fix the loop condition to i < beneficiaries.length. Replace the while loop with an explicit check using a mapping or require(beneficiaries.includes(msg.sender)).
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.