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

crypto/ecdsa: P521 ecdsa.Verify panics with malformed message [1.20 backport] #60744

Closed
gopherbot opened this issue Jun 12, 2023 · 2 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases
Milestone

Comments

@gopherbot
Copy link

@FiloSottile requested issue #60741 to be considered for backport to the next 1.20 minor release.

@gopherbot please open a Go 1.20 backport.

I think this doesn't have security impact because ECDSA hashes are not attacker-controlled and no one has a 528 hash laying around, but it's a spec deviation leading to a panic, so might as well fix it in Go 1.21 and backport it.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jun 12, 2023
@gopherbot gopherbot added this to the Go1.20.6 milestone Jun 12, 2023
@gopherbot
Copy link
Author

Change https://go.dev/cl/502915 mentions this issue: [release-branch.go1.20] crypto/ecdsa: properly truncate P-521 hashes

@prattmic prattmic added the CherryPickApproved Used during the release process for point releases label Jun 14, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Jun 14, 2023
gopherbot pushed a commit that referenced this issue Jun 19, 2023
Before, if a hash was exactly 66 bytes long, we weren't truncating it
for use with P-521, because the byte length was not overflowing.
However, the bit length could still overflow.

Fixes #60744
Updates #60741

Change-Id: I37a0ee210add0eb566e6dc1c141e83e992983eb6
Reviewed-on: https://go-review.googlesource.com/c/go/+/502478
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
(cherry picked from commit 886fba5)
Reviewed-on: https://go-review.googlesource.com/c/go/+/502915
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@gopherbot
Copy link
Author

Closed by merging a7a48fa to release-branch.go1.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases
Projects
None yet
Development

No branches or pull requests

2 participants