The giveReview function in the LevelOne contract lacks a critical check to verify if the current school session is still active. Teachers can continue giving reviews even after the sessionEnd timestamp has passed, violating the intended time-bound constraints of the educational system.
In the contract, a school session has a defined end time:
However, the giveReview function does not validate whether the current time is before sessionEnd:
This means teachers can continue to affect student scores even after a session has officially ended, which is a significant temporal boundary violation.
The impact of this vulnerability is high for several reasons:
Time Boundary Violation: Teachers can modify student scores outside the designated session period
Post-Session Score Manipulation: Student scores can be altered after the session has ended, potentially affecting graduation decisions
System State Inconsistency: The system enters a state where students cannot enroll (due to inSession being true) but teachers can still modify scores
Educational Fairness Breach: Students expect their final scores to be locked at session end, but they can still be modified
Contract Logic Violation: This breaks the intended lifecycle of the educational system where reviews should only happen during active sessions
The giveReview function should check if the current time is before sessionEnd:
Principal calls startSession setting sessionEnd to block.timestamp + 4 weeks
After 4 weeks pass, block.timestamp > sessionEnd
Teachers can still call giveReview and affect student scores
This creates an undefined period where the session has technically ended, but reviews can still be given
Add a session end validation check to the giveReview function:
Additionally, consider adding an explicit check for inSession == true to maintain consistency with other functions in the contract.
`inSession` not updated after during upgrade
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.