]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.24] crypto/x509: avoid panic when parsing partial PKCS#1 private...
authorFilippo Valsorda <filippo@golang.org>
Thu, 9 Jan 2025 15:03:08 +0000 (16:03 +0100)
committerGopher Robot <gobot@golang.org>
Thu, 16 Jan 2025 19:36:09 +0000 (11:36 -0800)
commit3de5aca7d00ac7d2c8a29e1300446e89453a8356
treea55311a87e56567f1ccafe7416c49910f4aad9d8
parent8336dfde7096ff75c1ff256cb3079863cefac33a
[release-branch.go1.24] crypto/x509: avoid panic when parsing partial PKCS#1 private keys

These keys are off-spec, but have historically been accepted by
ParsePKCS1PrivateKey.

Thanks to Philippe Antoine (Catena cyber) for reporting this issue.

Fixes #71216
Fixes CVE-2025-22865

Change-Id: I6a6a46564156fa32e29e8d6acbec3fbac47c7352
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1820
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Commit-Queue: Roland Shoemaker <bracewell@google.com>
(cherry picked from commit 36c6c8b6957e155770461fd710aea9477ef3bc88)
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1841
Reviewed-on: https://go-review.googlesource.com/c/go/+/643102
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/crypto/x509/pkcs1.go
src/crypto/x509/x509_test.go