Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecrecover may return empty address #56

Open
code423n4 opened this issue Oct 18, 2021 · 3 comments
Open

ecrecover may return empty address #56

code423n4 opened this issue Oct 18, 2021 · 3 comments
Assignees
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Warden finding resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

Handle

pauliax

Vulnerability details

Impact

There is a common issue that ecrecover returns empty (0x0) address when the signature is invalid. function recoverAddrImpl should check that before returning the result of ecrecover.

Recommended Mitigation Steps

See the solution here: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/cryptography/ECDSA.sol#L68

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Warden finding labels Oct 18, 2021
code423n4 added a commit that referenced this issue Oct 18, 2021
@Ivshti Ivshti added sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") and removed sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons labels Oct 19, 2021
@Ivshti
Copy link
Member

Ivshti commented Oct 19, 2021

resolved in AmbireTech/adex-protocol-eth@08d0506

@Ivshti Ivshti added the resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) label Oct 19, 2021
@Ivshti Ivshti self-assigned this Oct 19, 2021
@GalloDaSballo
Copy link
Collaborator

This is a very nasty gotcha from erecover.
The sponsor has mitigated

@GalloDaSballo
Copy link
Collaborator

It seems like the finding doesn't have bigger implications so I agree with the low severity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Warden finding resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

3 participants