DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: low
Invalid

LibWhitelist incorrectly verifies addresses

Summary

Verify functions in LibWhitelist are supposed to perform sanity checks that provided address is correct implementation.
It performs function call and ensures that call is successful. However such checks are incorrect and won't catch incorrect implementations in most of the cases.
Because it doesn't make sure that called address is contract.

Vulnerability Details

In LibWhitelis there are functions verifyOracleImplementation(), verifyGaugePointImplementation(), verifyLiquidityWeightImplementation(). They are mostly identical, they perform staticCall and check result boolean:

function verifyGaugePointImplementation(
address gpImplementation,
bytes4 selector
) internal view {
// verify you passed in a callable gaugePoint selector
(bool success, ) = gpImplementation.staticcall(abi.encodeWithSelector(selector, 0, 0, 0));
@> require(success, "Whitelist: Invalid GaugePoint selector");
}

However low level calls return success if address is EOA, so this check just don't work

Impact

Incorrect implementations can be configured because of incorrect sanity check.

Tools Used

Manual Review

Recommendations

Check that address contains code before calling it.

Updates

Lead Judging Commences

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

Informational/Gas

Invalid as per docs https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

LibWhitelist incorrectly verifies addresses - Low level calls return success on EOAs

Appeal created

T1MOH Submitter
about 1 year ago
inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Gas

Invalid as per docs https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

LibWhitelist incorrectly verifies addresses - Low level calls return success on EOAs

Support

FAQs

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