According to the documentation, students must have received all reviews before the system upgrade.
Students must have gotten all reviews before system upgrade. System upgrade should not occur if any student has not gotten 4 reviews (one for each week)
However, the graduateAndUpgrade
function does not validate the student reviews before upgrading the contract.
The vulnerability is located in the graduateAndUpgrade
function of the LevelOne
contract.
There is no validation for the student reviews before upgrading the contract. This means that the contract can be upgraded before all students have received their reviews, which is a violation of the documentation.
The existing test test_confirm_can_graduate
can be used to confirm this vulnerability. The test tries to upgrade the contract without giving 4 reviews to every student.
This test should fail according to the documentation but it does not.
The principal can graduate and upgrade the contract before all students have received their reviews. Since reviews can only decrease the score of a student, this can lead to students graduating without receiving all the expected reviews.
Manually reviewed the code and the documentation.
The graduateAndUpgrade
function should be changed to validate the student reviews before upgrading the contract. This will ensure that all students have received their reviews before the contract is upgraded.
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
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.