ChristmasDinner::setDeadline function takes as input parameter (uint256 _days) for which lacks a check to be greater than zero (>0)
By omissive or intentional setting of _days parameter to =0, deadline will become = block.timestamp.
The calculation is as follows:
block.timestamp + _days * 1 days = block.timestamp + 0 = block.timestamp
Copy the following code in the test suite and observe the revert reason:
By passing 0 as input parameter to the ChristmasDinner::setDeadline function would cause it to immediately expire upon being set because the deadline would be already equal to the current block.timestamp and any subsequent transaction will have a later timestamp.
This would block ChristmasDinner::deposit, ChristmasDinner::refund and partially ChristmasDinner::changeParticipationStatus as they rely either on the beforeDeadline modifier or directly on the state variable deadline.
Additionally (although problematic and part of another issue) the project obviously intends for the deadline to be set once and not to be changed after by anyone, including the host.
As this could influence ~ half of the protocol's functionality, primarily external functions, it should be considered as a serious vulnerability.
Manual review, Foundry
Add input validation in ChristmasDinner::setDeadline to prevent invalid values for _days:
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.