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

fix: Fix malleable signature (SC-5066) #26

Merged
merged 3 commits into from
Mar 10, 2022
Merged

Conversation

edag94
Copy link
Contributor

@edag94 edag94 commented Mar 10, 2022

Added to Permit:

// Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}.
require(uint256(s) <= S_VALUE_INCLUSIVE_UPPER_BOUND && (v == 27 || v == 28), "ERC20:P:MALLEABLE");

Addresses https://github.com/maple-labs/tob-audit-2022-03-07/issues/5

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #5066: [ERC20 audit] Prevent malleable signatures in Permit.

@edag94 edag94 changed the title Sc 5066 malleable sig fix: malleable sig (SC-5066) Mar 10, 2022
@edag94 edag94 self-assigned this Mar 10, 2022
@lucas-manuel lucas-manuel changed the title fix: malleable sig (SC-5066) fix: Fix malleable signature (SC-5066) Mar 10, 2022
@lucas-manuel lucas-manuel merged commit 2f5d53c into main Mar 10, 2022
@lucas-manuel lucas-manuel deleted the sc-5066-malleable-sig branch March 10, 2022 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants