DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: medium
Invalid

Lack of Validation in performUpkeep function.

Relevant GitHub Links

https://github.com/Cyfrin/2024-07-zaros/blob/main/src/external/chainlink/keepers/liquidation/LiquidationKeeper.sol#L100-L106

Summary

The performUpkeep function decodes peformData without validating the decoded data. This could lead to issues if the data is malformed or manipulated.

Vulnerability Details

Lack of Data Validation: Decoded accountsToBeLiquidated is used directly without validation

Impact

Unintended Behavior: Malformed or manipulated data could lead to unintended liquidations or errors.

Tools Used

Manual

Recommendations

Validate the decoded data before using it in the performUpkeep function.

function performUpkeep(bytes calldata peformData) external override onlyAuthorized {
uint128[] memory accountsToBeLiquidated = abi.decode(peformData, (uint128[]));
+ require(accountsToBeLiquidated.length > 0, "Invalid data");
LiquidationKeeperStorage storage self = _getLiquidationKeeperStorage();
(IPerpsEngine perpsEngine) = (self.perpsEngine);
perpsEngine.liquidateAccounts(accountsToBeLiquidated);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.