Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: low
Invalid

Missing zero value check from ecrecover function

Impact

The ecrecover returns zero on error when recovering a signature, the check for the same is missing

Description

As we can see, the offical docs for ecrecover, it states:

recover the address associated with the public key from elliptic curve signature or return zero on error.

But in the following line NativeMetaTransaction.sol#L100, we can see that there is no handling of this edge case.

The following check for the same is missing, and should be enforced to prevent any edge-cases or unwanted behaviour of smart-contracts.

Tools Used

Manual Review

Recommendation

Perform checks on the return value from ecrecover() and revert if the value is 0.

Updates

Lead Judging Commences

0xbrivan2 Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
0xbrivan2 Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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