In the LibSilo:burnGerminatingStalk
function, there is no check to ensure that the stalk
parameter is not greater than the s.a[account].farmerGerminating
stalk or s.unclaimedGerminating[season]
stalk. This will result in negative values after subtraction, which is not acceptable.
See vulnerability here:
These mentioned variables are unsigned integers. Storing negative values in unsigned integer variables will lead to unexpected behavior and could potentially disrupt the entire unclaimed process. This issue could introduce inconsistencies in the system and may cause unintended consequences.
Manual Review
Add a check to ensure that stalk
does not exceed mentioned variables before subtracting the values. If it does, you can handle this situation appropriately, such as reverting the transaction or logging an error message.
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.