As the comment and documentation indicate, the checkList method should only be callable by Santa
Which is not the case as the onlySanta
modifier is missing in this method allowing anyone to update the s_theListCheckedOnce
associate to his or other user status.
The missing modifier should be implemented here
As we can see in this poc an exploiter can modify the s_theListCheckedOnce
status.
Since checkTwice ensures that checkList maintains the same status, two types of attacks can be carried out:
1 - A malicious user may alter another user's status, preventing them from collecting a present.
2- A user could manipulate the s_theListCheckedOnce status before Santa sets the s_theListCheckedTwice status. For example, if s_theListCheckedOnce is NAUGHTY, but Santa plans to set s_theListCheckedTwice to NICE, a user could change the status of s_theListCheckedOnce before Santa sets the second value, thereby becoming eligible to collect a present.
Forge test
Add the onlySanta modifier to the checkList method
Anyone is able to call checkList() changing the status of a provided address. This is not intended functionality and is meant to be callable by only Santa.
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.