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

The onlyBeneficiaryWithIsInherited modifier relies on array out-of-bounds reverts

Summary

The onlyBeneficiaryWithIsInherited modifier relies on array out-of-bounds reverts instead of explicit validation

Vulnerability Details

modifier onlyBeneficiaryWithIsInherited() {
uint256 i = 0;
while (i < beneficiaries.length + 1) { // Intentionally runs past array bounds
if (msg.sender == beneficiaries[i] && isInherited) {
break;
}
i++;
}
_;
}

Impact

  • Unclear error messaging when access is denied

Tools Used

manual review

Recommendations

Use explicit validation with error NotBeneficiary(msg.sender);

Updates

Lead Judging Commences

0xtimefliez Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
0xtimefliez Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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