The ecrecover
returns zero on error when recovering a signature, the check for the same is missing
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.
Manual Review
Perform checks on the return value from ecrecover()
and revert if the value is 0
.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.