The host can arbitrarily end the sign up period by calling setDeadline() and passing 0 days as the argument. The result is that th sign up period immediately ends. Participants who already registered are locked in losing the ability to change their mind up until the previous deadline that was in place.
Prevents participants from benefiting from the sign up period to change their mind or call refund.
Allows hosts to lock in participants who already signed up and contributed.
Allows the host to take the ETH of any participants who tried to sign up via ETH.
Contract receives ETH deposits in receive()
Host calls setDeadline(0)
Host deposits some ETH into ChristmasDinner contract
Host calls refund() and re-enters (from a malicious contract Host controls) until all ETH is drained
See PoC:
See malicious contract:
Manual review
Solution: Allow the host to extend the deadline but not reduce it by implementing following check:
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.