The function "checkList" in "SantasList.sol" contract is missing the modifier "onlySanta" contrary to it's documentation and to the protocol.
The "checkList" function can be called with success by anyone. But it should revert.
If you add this test to SantasListTest.t.sol it will pass, but it shouldn't:
Any address can call "checkList" and change the state variable of the mapping "s_theListCheckedOnce" in "SantaList.sol".
As a result, this vulnerability allows an attacker to prevent NICE/EXTRA_NICE users from collecting their presents.
Manual inspection & Foundry testing
Add "onlySanta" modifier to the "checkList" function:
function checkList(address person, Status status) external onlySanta {
s_theListCheckedOnce[person] = status;
emit CheckedOnce(person, status);
}
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.