this bug breaks the protocl rules where the principal
can easily upgrade the system even if not all the students have gotten their complete four reviews before the upgrade and the graduation.
1- Navigate to test/LeveOnelAndGraduateTest.t.sol
file
2- Add the following PoC code to the test
file:
3- In the command line, run the following command: forge test --match-test testStudentsCanGraduateEvenIfNotGotFourReviews -vvv
4- the output would be as following :
this bug completely breaks the protocol rules and implementations where the rules say 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)
but using the test PoC Code
showing a complete break/bypass for this rule. Allowing the Principal
to upgrade the system and claims the rewards even if not all the students have gotten their all reviews (4 reviews).
Manual Recon
foundry test suite
Add the following implementation in the LevelOne::giveReview
function :
and also add the following restriction to the LevelOne::graduateAndUpgrade
function :
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.