The rustfund program fails to properly protect against multiple deadline changes due to an incomplete implementation of the set_deadline function. While the function checks if a deadline has already been set, it never updates the flag indicating a deadline has been set, allowing fund creators to change deadlines multiple times and potentially manipulate the campaign timing.
The set_deadline function allows a fund creator to set a deadline for the campaign. The function includes a check to determine if the deadline has already been set by examining the dealine_set flag
However, after setting the deadline value, the function fails to update the dealine_set flag to true. This omission means that the check will always evaluate to false, allowing fund creators to repeatedly modify the deadline by calling the function multiple times.
Refund Timing Exploitation: By changing deadlines, creators could prevent contributors from claiming refunds by continually extending the deadline before it's reached.
Manual Review
Update the set_deadline function to set the flag after setting the deadline
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.