The set_deadline function in the rustfund program fails to set the dealine_set flag to true after assigning a deadline. This oversight allows unauthorized modifications to the deadline, potentially undermining the integrity of the crowdfunding process.
In the set_deadline function, the following logic is implemented:
The function checks whether the deadline has already been set using the dealine_set flag. However, after setting the deadline, the flag is not updated to true. As a result, the creator can repeatedly call this function to modify the deadline, leading to potential manipulation of the crowdfunding process.
Unauthorized modification of the fundraising deadline, potentially extending or shortening the campaign duration unfairly.
Compromised trustworthiness of the crowdfunding process, affecting contributors’ confidence.
Potential abuse by the fund creator to extend deadlines indefinitely, exploiting contributors’ funds.
Manual code review
Analysis of control flow in the set_deadline function
To address this vulnerability, update the set_deadline function to correctly set the dealine_set flag to true 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.