Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Valid

We can update even if the session hasn't reached `sessionEnd`

Summary

There are no checks if we reached sessionEnd or not.

Vulnerability Details

The invariant says:

  • System upgrade cannot take place unless the school's sessionEnd has reached

However, in LevelOne::graduateAndUpgrade, we don't check if we reached the sessionEnd or not.

Impact

The system can upgrade before the sessionEnd was reached, which breaks the invariant quoted above. However, since this call needs to be done by the principal, I assume they're trusted, so it's Low severity.

Tools Used

Manual Review

Recommendations

Add a check inside LevelOne::graduateAndUpgrade if block.timestamp >= sessionEnd.

Updates

Lead Judging Commences

yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

can graduate without session end

`graduateAndUpgrade()` can be called successfully even when the school session has not ended

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.