Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Valid

Review Count Limit Bypass Due to Missing Counter Increment

Summary

The contract checks for a maximum review count but never increments it, completely breaking the review limit system.

Vulnerability Details

Root cause:

require(reviewCount[_student] < 5, "Student review count exceeded!!!");
// No increment of reviewCount[_student]

Initial State:

  • reviewCount starts at 0

  • Limit check exists but no increment

Step 1: Teacher gives review
Step 2: reviewCount remains at 0
Step 3: Can give unlimited reviews
Step 4: Review limit completely bypassed

Implications:

  • Review limit system non-functional

  • Unlimited reviews possible

  • Student scores vulnerable to manipulation

Impact

  • Complete breakdown of review limit system

  • Potential for targeted harassment

  • No protection against review spam

  • Score manipulation possible

Tools Used

Manual Review

Recommendations

function giveReview(address _student, bool review) public onlyTeacher {
require(reviewCount[_student] < 5, "Max reviews reached");
reviewCount[_student]++;
// ...existing code...
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge about 2 months ago
Submission Judgement Published
Validated
Assigned finding tags:

reviewCount not updated

`reviewCount` for students is not updated after each review session

Support

FAQs

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