The graduateAndUpgrade function does not validate that the school session has ended, allowing premature graduation and system upgrades, this violates a core invariant regardless of wether principal is trusted or not.
Root Cause: The graduateAndUpgrade function lacks a check to verify block.timestamp >= sessionEnd, violating the core invariant that "System upgrade cannot take place unless school's sessionEnd has reached".
Initial State:
School session started
Session end time set
Students and teachers active
Attack Flow:
Principal starts session with 4-week duration
Principal can call graduateAndUpgradebefore 4 weeks duration
Students lose opportunity to complete full session
System upgrades before session properly ends
Sessions can be prematurely terminated
Students denied full learning period
Teachers denied opportunity to give all reviews
Core educational process compromised
Violates fundamental timing invariant
Manual review
Add session end validation:
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
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.