Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Invalid

Contract Name: InheritanceManager :- Critical Security Fixes

Summary

The InheritanceManager contract handles inheritance-based asset management with NFT-based estate tracking, ERC20/ETH transfers, and ownership transitions based on inactivity. It includes security mechanisms like non-reentrancy guards, modifier-based access control, and on-chain interactions tracking.

Vulnerability Details

Issue : onlyBeneficiaryWithIsInherited() Modifier Causes Out-of-Bounds Error

Impact

The while loop condition uses beneficiaries.length + 1, which causes an array out-of-bounds error.

Tools Used

````

modifier onlyBeneficiaryWithIsInherited() {
uint256 i = 0;
while (i < beneficiaries.length + 1) { // ❌ This will access invalid index
if (msg.sender == beneficiaries[i] && isInherited) {
break;
}
i++;
}
_;
}

````

Recommendations

Change while (i < beneficiaries.length + 1) to while (i < beneficiaries.length).

````

modifier onlyBeneficiaryWithIsInherited() {
uint256 i = 0;
while (i < beneficiaries.length) {
if (msg.sender == beneficiaries[i] && isInherited) {
break;
}
i++;
}
_;
}

````

Updates

Lead Judging Commences

0xtimefliez Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!