The graduateAndUpgrade function fails to reset inSession to false after graduation, allowing the old contract to remain in an active session state and potentially affecting the upgraded contract.
Root Cause: In LevelOne.sol, the session state is not reset during graduation:
Initial State:
School in session (inSession = true)
Ready for graduation
Session end time reached
Attack Flow:
Principal calls graduateAndUpgrade
Contract upgrades to LevelTwo
inSession remains true
New contract inherits active session state
Could interfere with new contract's session management
Session state persists incorrectly after upgrade
New contract starts with invalid session state
Could prevent new session from starting
Breaks session management logic
Could affect student enrollments and reviews in new contract
Manual review
Add session state reset in graduation function:
`inSession` not updated after during upgrade
`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.