DeFiHardhatOracleProxyUpdates
100,000 USDC
View results
Submission Details
Severity: low
Invalid

Missing input validation on the provided addresses in `addUnripeToken`

Summary

The function UnripeFacet:addUnripeToken(address unripeToken, address underlyingToken, bytes32 root) does not perform any input validation on the provided addresses (unripeToken, underlyingToken). It's essential to verify that these addresses are valid and non-zero before proceeding.

Vulnerability Details

As seen below, there is no input validation check for the addresses.

function addUnripeToken(address unripeToken, address underlyingToken, bytes32 root) external payable nonReentrant {
LibDiamond.enforceIsOwnerOrContract();
s.u[unripeToken].underlyingToken = underlyingToken;
s.u[unripeToken].merkleRoot = root;
emit AddUnripeToken(unripeToken, underlyingToken, root);
}

Impact

If the addUnripeToken function does not properly handle zero addresses and attempts to use them in operations that require valid addresses, it may prevent the contract from functioning correctly or executing certain functionalities as intended. Also storing zero addresses as valid token addresses can lead to confusion and incorrect data representation within the system.

Tools Used

Manual Review

Recommendations

Before proceeding with token registration, validate that both the unripe token address and the underlying token address are non-zero and acceptable to be added. This ensures that only valid token addresses are accepted for registration.

Updates

Lead Judging Commences

giovannidisiena Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Invalid

0xbeastboy Submitter
over 1 year ago
giovannidisiena Lead Judge
over 1 year ago
giovannidisiena Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Invalid

Support

FAQs

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