Crucial setter functions lack checks for valid inputs #243
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/Booster.sol#L128-L153
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/VoterProxy.sol#L83-L87
Vulnerability details
Impact
Several important setter functions lack checks to determine the parameters' validity. The malicious or accidental use of incorrect parameters may lead to unwanted results. The vulnerabilities have been split into two categories depending on their effects.
-Category 1: Incorrect inputs can lead to frozen or stolen funds
-Category 2: Incorrect inputs can lead to DoS of major protocol functionality
Proof of Concept
Category 1:
-
Booster.setOwner()
has no zero address check. If it is accidentally set to address(0), updating voting delegate will not be possible. Secondly theshutdownSystem()
function will be be inaccessible in case of an attack. Lastly, withdrawing (through_withdraw()
) will not be possible and funds will be stuck.Category 2:
-Booster.setFeeManager has no zero address check. If address is accidentally set to zero fees (lockIncentive, stakeIncentive, earmarkIncentive, platformFee) will not be able to be updated.
-Booster.setPoolManager has no zero address check. If address is accidentally set to zero it will not be possible to add or shutdown pools. Could be dangerous in case a pool finds itself under attack.
-Booster.setVoteDelegate has no zero address check. If address is accidentally set to zero it will not be possible to cast votes on
VoterProxy.sol
Booster.setTreasury has no zero address check. If it is accidentally set to zero no
crv
will be sent to it and will accumulate inBooster.sol
.VoterProxy.setOwner has no zero address check. If it is accidentally set to zero it will not be possible to use
setRewardDeposit
,setSystemConfig
,setOperator
and other functions. This might lead to having to redeploy the contract.Tools Used
Manual review.
Recommended Mitigation Steps
Add checks to validate that input addresses for crucial setter functions are not address(0).
The text was updated successfully, but these errors were encountered: