Each negative review executes studentScore[_student] -= 10;
.
If the current score is < 10, the subtraction causes an arithmetic underflow and the EVM reverts with panic(0x11)
.
The contract lacks a prior check (>= 10
) or use of the unchecked
keyword, so the first subtraction that drives the score below zero permanently freezes the review function for that student.
Impact:
Functional DoS: no teacher can ever review the affected student again.
Loss of academic integrity: the student is perpetually unable to improve their score.
Potential systemic lock-up if other functions depend on future reviews.
Proof of Concept:
Recommended Mitigation:
Alternatively, use SafeCast/SafeMath or unchecked with pre-protection logic, ensuring the score never goes below 0.
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.