This report identifies a common vulnerability in solidity smart contracts, where the address state variables are not checked for the zero address (address(0x0)) when assigning values to them. This could allow an attacker to set the address variables to zero and cause unexpected behaviors or errors in the contract logic.
The address state variables are used to store the addresses of other contracts or accounts that interact with the contract. However, some of the functions that assign values to these variables do not check if the input address is valid or not.
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPoolManager.sol#L107-L137
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/SmartVaultV3.sol#L37
The impact of this vulnerability is a loss of functionality or security for the contract, as the contract will not be able to interact with the other contracts or accounts that are stored in the address variables. This could affect the liquidity, solvency, and integrity of the contract and its users.
Manul
The recommendations to fix this vulnerability are:
Add a require statement to check if the input address is not zero before assigning it to the address variable. For example:
Use the OpenZeppelin Address library to validate the input address using the isContract
function. For example:
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.