The giveReview function checks the review count but never increments it, allowing teachers to submit unlimited reviews for a student within or not even submit a review for a student at all and the student wlll still graduate and this breaks the core invariant that students must go through 4 reviews (one weekly) before they can be graduated .
Root Cause: In LevelOne.sol, the giveReview function checks reviewCount but doesn't increment it after a review is given:
Initial State:
School in session
Teacher registered
Student enrolled with initial score of 100
Attack Flow:
Teacher calls giveReview with review = false
Student score decreases by 10
Teacher can call giveReview again more than 4 times
Process can be repeated until student score reaches 0
Teachers can submit unlimited negative reviews
Student scores can be maliciously reduced to 0
Compromises the entire grading system
Add review count increment:
}
`reviewCount` for students is not updated after each review session
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.