20,000 USDC
View results
Submission Details
Severity: low
Valid

Lack of check for user input address != address(0)

Summary

Lack of check for user input address != address(0) in Ownable.transferOwnership(), Fees.constructor() and Lender. setFeeReceiver().

Vulnerability Details

Bob calls transferOwnership() with a wrong _owner address, so Bob loses ownership of the contract.

Impact

Wrong user input can lead to loss of contract ownership or wrong token addresses in Fees.sol or useless expensive external call costing gas in setFeeReceiver() if the owner has to call it again to set it to the right address.

Tools Used

Manual review

Recommendations

Check that the address is not zero.

Support

FAQs

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

Give us feedback!