Snowman Merkle Airdrop

First Flight #42
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Strict Equality Risk

Root + Impact

Description

  • Whitelist array length determines JSON entry count.

  • Fixed-length array iteration assumes static size, causing overflow/underflow if modified.

// string[] whitelist = new string[](5); // @> Fixed-size array
// In _createJSON():
for (uint i; i < 5; i++) { // @> Hardcoded length assumption
// Accesses whitelist[i]
}

Risk

Likelihood:

  • Guaranteed during whitelist size changes

  • High when refactoring code

  • Certain during dynamic input integration

Impact:

  • Array index out-of-bounds reverts

  • Incomplete JSON generation

  • Undetected data truncation

Proof of Concept

// Developer adds 6th address without updating loop
whitelist.push(vm.toString(makeAddr("frank")));
// Accessing whitelist[5] reverts

Recommended Mitigation

- for (uint i; i < 5; i++) {
+ for (uint i; i < whitelist.length; i++) {
// Process entry
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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