DeFiHardhat
35,000 USDC
View results
Submission Details
Severity: low
Invalid

`FertilizerFacet::getFertilizers` can go in DOS if LibFertilizer.getNext(idx) returns greater than 0 for after certain number of iterations

Vulnerability Details

FertilizerFacet::getFertilizers has while loop which checking idx > 0. and idx is returned from LibFertilizer.getNext(idx). If idx > 0 for many iterations than due to out of gas this can go in dos.

216: while (idx > 0) {
numFerts = numFerts.add(1);
idx = LibFertilizer.getNext(idx);
}

Impact

Function can go in DOS

Tools Used

Manual Review

Recommendation :

Add range constraints on loop before running them revert if iterations are more than specified range.

Updates

Lead Judging Commences

giovannidisiena Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Too generic
Assigned finding tags:

Informational/Invalid

Support

FAQs

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