The set_deadline
function allows the fund owner to set the deadline for a fund. Although it checks if the deadline has already been set using the dealine_set
flag, this flag is never updated after the deadline is set. As a result, the fund owner can repeatedly update the deadline without restriction.
In the set_deadline
function, the fund owner sets the fund’s deadline:
The function checks the dealine_set
flag to prevent resetting the deadline, but after setting fund.deadline
, the dealine_set
flag remains unchanged (i.e., it is not set to true). This allows the fund owner to call set_deadline
multiple times and update the deadline indefinitely.
The fund owner can continuously modify the deadline, potentially extending the fundraising period or delaying refunds. This undermines the integrity of the fund’s timeline and could confuse or mislead contributors who rely on a fixed deadline.
Add the following PoC code to rustfund.ts
to test the vulnerability:
The logs show that dealineSet
remains false
even after calling setDeadline
:
Manual Code Review and Foundry
Update 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.