Detailed description of the impact of this finding.
require statement needs to be added to prevent usage of a zero address
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
function acceptOwnership(address newTarget) external { @audit
target = newTarget;
ILSP14Ownable2Step(target).acceptOwnership();
}
function transferOwnership(address newOwner) external { @audit
ILSP14Ownable2Step(target).transferOwnership(newOwner);
}
Lines of code
https://github.com/code-423n4/2023-06-lukso/blob/bd49f57c32a522563fc42feeee23c83c8b373405/contracts/Mocks/LSP20Owners/FallbackReturnMagicValue.sol#L30-L37
Vulnerability details
Impact
Detailed description of the impact of this finding. require statement needs to be added to prevent usage of a zero address
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. function acceptOwnership(address newTarget) external { @audit target = newTarget; ILSP14Ownable2Step(target).acceptOwnership(); }
Tools Used
vscode
Recommended Mitigation Steps
use require(address != 0)
Assessed type
Other