Malicious actor can cause DOS by gas exhaustion attack.
we can know the checkList Only callable by santa from comment and README.md, the modifier onlySanta maybe forgot add in checkList just like checkTwice.
This can cause checkList can callable by anyone, and it will give malicious actor chance.
In checkTwice, the status is checked to see if it is equal to the status at the first check, which means that the status is subject to change.
An event is emitted when the checkList is successfully called, so malicious actor maybe can exhausting the gas in contract cause DOS by call this function and emit events without limit.
Working Test Case:
Add the test to the SantasListTest.t.sol file. Running the test with forge test --match-test testCheckListCanCallableByAnyone -vvv we can see:
The test shows that anyone can call, and the number of times is unlimited (the test is only tested 1_000_000 times, it can be more).
There's a severe disruption of protocol functionality or availability.
Foundry
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.