gnupg update and fix outstanding CVE
v2 cover gnupg update and fix outstanding CVE
In order to squash multiple smaller bugs, bump from version 2.5.17->2.5.20, however that does not resolve CVE-2026-57062, so it is backported from gnupg master.
Changes compared to v1:
- remove accidentally slipped in SRCREV in gnupg recipe
Roland Kovacs (2):
gnupg: Upgrade 2.5.17 -> 2.5.20
gnupg: fix CVE-2026-57062
.../gnupg/gnupg/CVE-2026-57062.patch | 43 +++++++++++++++++++
.../{gnupg_2.5.17.bb => gnupg_2.5.20.bb} | 3 +-
2 files changed, 45 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-support/gnupg/gnupg/CVE-2026-57062.patch
rename meta/recipes-support/gnupg/{gnupg_2.5.17.bb => gnupg_2.5.20.bb} (95%)Signature · 1 line
2.34.1
PATCH v2 1/2 gnupg: Upgrade 2.5.17 -> 2.5.20
Bug fixes included in this release:
- gpg: Fix wrong assertion failure which could very rarely occur during key signature checking. [rG693f5642f6]
- gpg: Consider certify-only keys for revocation signature check.
[T8196]
- gpgsm: Fix possible double free in the CMS parser. [T8240]
- gpgsm: Fix possible too early removal of ephemeral keys. [T8236]
- gpgsm: Avoid emitting a final FAILURE status line if --status-fd
is not used. [rG69c27fe377]
- gpgsm: Fix a regression in 2.5.19 for password encrypted GCM
data. [rG60a823c97b]
- agent: Fix not using cache for pinentry loopback. [rGd4b608a31f]
- agent: Fix command PUT_SECRET by saving input line. [rG1875bc185e]
- keyboxd: Mark keys searched but not imported via LDAP correctly
as ephemeral. [T8048]
- scdaemon: Avoid buffer overflow with SC-HSM cards providing RSA
keys > 2k. [T8244]
- dirmngr: Fix uninitialized use of the dns_any union in
dns_rr_cmp. [T8251]Release-info: https://dev.gnupg.org/T7997
---
meta/recipes-support/gnupg/{gnupg_2.5.17.bb => gnupg_2.5.20.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-support/gnupg/{gnupg_2.5.17.bb => gnupg_2.5.20.bb} (97%)meta/recipes-support/gnupg/gnupg_2.5.20.bb renamed from meta/recipes-support/gnupg/gnupg_2.5.17.bb +1 -1
@@ -24,7 +24,7 @@ SRC_URI:append:class-native = " file://0001-configure.ac-use-a-custom-value-for- file://relocate.patch" SRC_URI:append:class-nativesdk = " file://relocate.patch" -SRC_URI[sha256sum] = "2c1fbe20e2958fd8fb53cf37d7c38e84a900edc0d561a1c4af4bc3a10888685d" +SRC_URI[sha256sum] = "6461266e99c308419a379abe6c356d54c214136c4589bd65951091138989ffc6" EXTRA_OECONF = "--disable-ldap \ --disable-ccid-driver \
Signature · 1 line
2.34.1
PATCH v2 2/2 gnupg: fix CVE-2026-57062
In reply to Roland KovacsCMS (Cryptographic Message Syntax) parsing in gpgsm in GnuPG through 2.5.20 mishandles the CMS format for AES-GCM because aes-ICVlen is supposed to be 12 bytes but 4 bytes is accepted.
--- .../gnupg/gnupg/CVE-2026-57062.patch | 43 +++++++++++++++++++ meta/recipes-support/gnupg/gnupg_2.5.20.bb | 1 + 2 files changed, 44 insertions(+) create mode 100644 meta/recipes-support/gnupg/gnupg/CVE-2026-57062.patch
meta/recipes-support/gnupg/gnupg/CVE-2026-57062.patch new file +43 -0
@@ -0,0 +1,43 @@ +From d586f50ee849c8cbeaea47b50c64446c1becbf9b Mon Sep 17 00:00:00 2001 +From: Werner Koch <[email protected]> +Date: Thu, 18 Jun 2026 10:51:34 +0200 +Subject: [PATCH] gpgsm: Require a minimum tag length for GCM decryption. + +* sm/decrypt.c (gpgsm_decrypt): Require a minimum authtaglen. +-- + +Reported-by: Thai Duong <[email protected]> +This is similar to OpenSSL's +CVE-id: CVE-2026-34182 + +CVE: CVE-2026-57062 +Upstream-Status: Backport [https://github.com/gpg/gnupg/commit/4c7e68cf3d335328821bdbb70db309a60d0e4fd4] + +Signed-off-by: Roland Kovacs <[email protected]> +--- + sm/decrypt.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/sm/decrypt.c b/sm/decrypt.c +index 20fb96060..92a33c6e6 100644 +--- a/sm/decrypt.c ++++ b/sm/decrypt.c +@@ -1447,7 +1447,14 @@ gpgsm_decrypt (ctrl_t ctrl, estream_t in_fp, estream_t out_fp) + } + if (DBG_CRYPTO) + log_printhex (authtag, authtaglen, "Authtag ...:"); +- rc = gcry_cipher_checktag (dfparm.hd, authtag, authtaglen); ++ if (authtaglen < 12) ++ { ++ log_info ("authentication tag is too short (%zu octets)\n", ++ authtaglen); ++ rc = gpg_error (GPG_ERR_CHECKSUM); ++ } ++ else ++ rc = gcry_cipher_checktag (dfparm.hd, authtag, authtaglen); + xfree (authtag); + if (rc) + log_error ("data is not authentic: %s\n", gpg_strerror (rc)); +-- +2.34.1 +
meta/recipes-support/gnupg/gnupg_2.5.20.bb +1 -0
@@ -19,6 +19,7 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/ftp/gcrypt/gnupg/" SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://0002-use-pkgconfig-instead-of-npth-config.patch \ file://0001-Woverride-init-is-not-needed-with-gcc-9.patch \ + file://CVE-2026-57062.patch \ " SRC_URI:append:class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \ file://relocate.patch"
Signature · 1 line
2.34.1