mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
gnutls: patch CVE-2025-32988
Pick relevant commit from 3.8.10 release MR [1]. [1] https://gitlab.com/gnutls/gnutls/-/merge_requests/1979 (From OE-Core rev: 3600752d06c14fcfa0bc1b96222cc6a164955bb5) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
37cd90079b
commit
ab47f0cc84
@@ -0,0 +1,58 @@
|
|||||||
|
From 608829769cbc247679ffe98841109fc73875e573 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daiki Ueno <ueno@gnu.org>
|
||||||
|
Date: Mon, 7 Jul 2025 10:44:12 +0900
|
||||||
|
Subject: [PATCH] x509: avoid double free when exporting othernames in SAN
|
||||||
|
|
||||||
|
Previously, the _gnutls_write_new_othername function, called by
|
||||||
|
gnutls_x509_ext_export_subject_alt_names to export "otherName" in a
|
||||||
|
certificate's SAN extension, freed the caller allocated ASN.1
|
||||||
|
structure upon error, resulting in a potential double-free.
|
||||||
|
|
||||||
|
Reported by OpenAI Security Research Team.
|
||||||
|
|
||||||
|
Signed-off-by: Daiki Ueno <ueno@gnu.org>
|
||||||
|
|
||||||
|
CVE: CVE-2025-32988
|
||||||
|
Upstream-Status: Backport [https://gitlab.com/gnutls/gnutls/-/commit/608829769cbc247679ffe98841109fc73875e573]
|
||||||
|
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||||
|
---
|
||||||
|
NEWS | 5 +++++
|
||||||
|
lib/x509/extensions.c | 2 --
|
||||||
|
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/NEWS b/NEWS
|
||||||
|
index 025e05148..ff289fa75 100644
|
||||||
|
--- a/NEWS
|
||||||
|
+++ b/NEWS
|
||||||
|
@@ -10,6 +10,11 @@ See the end for copying conditions.
|
||||||
|
and fix developed by Andrew Hamilton. [GNUTLS-SA-2025-07-07-1,
|
||||||
|
CVSS: medium] [CVE-2025-32989]
|
||||||
|
|
||||||
|
+** libgnutls: Fix double-free upon error when exporting otherName in SAN
|
||||||
|
+ Reported by OpenAI Security Research Team. [GNUTLS-SA-2025-07-07-2,
|
||||||
|
+ CVSS: low] [CVE-2025-32988]
|
||||||
|
+
|
||||||
|
+
|
||||||
|
* Version 3.7.4 (released 2022-03-17)
|
||||||
|
|
||||||
|
** libgnutls: Fixed double free during verification of pkcs7 signatures.
|
||||||
|
diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c
|
||||||
|
index 6c2da8fd1..e8be12eaf 100644
|
||||||
|
--- a/lib/x509/extensions.c
|
||||||
|
+++ b/lib/x509/extensions.c
|
||||||
|
@@ -805,7 +805,6 @@ _gnutls_write_new_othername(asn1_node ext, const char *ext_name,
|
||||||
|
result = asn1_write_value(ext, name2, oid, 1);
|
||||||
|
if (result != ASN1_SUCCESS) {
|
||||||
|
gnutls_assert();
|
||||||
|
- asn1_delete_structure(&ext);
|
||||||
|
return _gnutls_asn2err(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -814,7 +813,6 @@ _gnutls_write_new_othername(asn1_node ext, const char *ext_name,
|
||||||
|
result = asn1_write_value(ext, name2, data, data_size);
|
||||||
|
if (result != ASN1_SUCCESS) {
|
||||||
|
gnutls_assert();
|
||||||
|
- asn1_delete_structure(&ext);
|
||||||
|
return _gnutls_asn2err(result);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -35,6 +35,7 @@ SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar
|
|||||||
file://5477db1bb507a35e8833c758ce344f4b5b246d8e \
|
file://5477db1bb507a35e8833c758ce344f4b5b246d8e \
|
||||||
file://0001-x509-reject-zero-length-version-in-certificate-reque.patch \
|
file://0001-x509-reject-zero-length-version-in-certificate-reque.patch \
|
||||||
file://3e94dcdff862ef5d6db8b5cc8e59310b5f0cdfe2 \
|
file://3e94dcdff862ef5d6db8b5cc8e59310b5f0cdfe2 \
|
||||||
|
file://CVE-2025-32988.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[sha256sum] = "e6adbebcfbc95867de01060d93c789938cf89cc1d1f6ef9ef661890f6217451f"
|
SRC_URI[sha256sum] = "e6adbebcfbc95867de01060d93c789938cf89cc1d1f6ef9ef661890f6217451f"
|
||||||
|
|||||||
Reference in New Issue
Block a user