Hawk High

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

Missing Review Count Increment

Summary

The giveReview function in LevelOne doesn't increment the review count, making it impossible to track if students have received all required reviews before upgrading to LevelTwo.

Vulnerability Details

While the giveReview function checks that a student hasn't exceeded the maximum number of reviews, it never increments the count:

function giveReview(address _student, bool review) public onlyTeacher {
// ...
require(reviewCount[_student] < 5, "Student review count exceeded!!!");
// ...
// No increment of reviewCount[_student]
}

According to the system requirements, "Students must have gotten all reviews before system upgrade. System upgrade should not occur if any student has not gotten 4 reviews." However, the system has no way to verify this requirement due to the missing increment.

Impact

The failure to track review counts has significant impacts:

The system cannot enforce the requirement that all students receive the required number of reviews

Upgrades may occur prematurely, violating a core system invariant

Students may be unfairly evaluated due to missing reviews

The graduation process cannot validate that proper academic evaluations were completed

Tools Used

manual review

Recommendations

Add the missing review count increment to the giveReview function

// Add missing increment
reviewCount[_student] += 1;
Updates

Lead Judging Commences

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

reviewCount not updated

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

yeahchibyke Lead Judge 6 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.