Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gnutls: security bump to version 3.8.14
@ 2026-11-26 10:43 Marcus Hoffmann via buildroot
  2026-11-26 15:51 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Marcus Hoffmann via buildroot @ 2026-11-26 10:43 UTC (permalink / raw)
  To: buildroot

Fixes the following CVEs:

** libgnutls: Fix crash on certificate list memory allocation failure
   On allocation failure, the certificate list pointer and count could
   get out of sync, causing a NULL deref or double-free during session cleanup.
   Both fields are now zeroized before the allocation.
   Reported by Joshua Rogers of AISLE Research Team.
   [GNUTLS-SA-2026-11-18-1, severity: low] [CVE-2026-127039]

** libgnutls: Fix crash in RSA-PSK username copy memory allocation failure
   A missing return on a failed username copy could crash the handshake
   when memory allocation fails.
   The error is now propagated, aborting the handshake.
   Reported by Joshua Rogers of AISLE Research Team.
   [GNUTLS-SA-2026-11-18-2, severity: low] [CVE-2026-127040]

** libgnutls: Make name constraints deinitialization idempotent
   If reinitializing the name constraints were to fail due to memory pressure,
   the verification context cleanup
   could have freed the same internal lists a second time,
   crashing the application.
   The deinitialization functions now clear the pointers after freeing.
   Reported by Xuqing Yang.
   [GNUTLS-SA-2026-11-18-3, severity: low] [CVE-2026-127231]

Full release Notes:
https://gitlab.com/gnutls/gnutls/-/blob/3.8.14/NEWS#L8

Backport an upstream submitted patch[1] to fix the build with nothreads
toolchains which was introduced in 3.8.14.

[1] https://gitlab.com/gnutls/gnutls/-/merge_requests/2192

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
---
 ...hreads-toolchain-after-gnulib-update.patch | 75 +++++++++++++++++++
 package/gnutls/gnutls.hash                    |  4 +-
 package/gnutls/gnutls.mk                      |  2 +-
 3 files changed, 78 insertions(+), 3 deletions(-)
 create mode 100644 package/gnutls/0001-fix-build-with-nothreads-toolchain-after-gnulib-update.patch

diff --git a/package/gnutls/0001-fix-build-with-nothreads-toolchain-after-gnulib-update.patch b/package/gnutls/0001-fix-build-with-nothreads-toolchain-after-gnulib-update.patch
new file mode 100644
index 0000000000..a370cd0bd2
--- /dev/null
+++ b/package/gnutls/0001-fix-build-with-nothreads-toolchain-after-gnulib-update.patch
@@ -0,0 +1,75 @@
+From 1a149254ee82a50dc9633fc60a94df1a480a124f Mon Sep 17 00:00:00 2001
+From: Marcus Hoffmann <buildroot@bubu1.eu>
+Date: Wed, 25 Nov 2026 19:05:00 +0100
+Subject: [PATCH] fix build with nothreads toolchain after gnulib update
+
+Gnulib made including glthread/once.h from glthread/lock.h conditional
+in [1]. This was synced to gnutls in [2] and first released in
+gnutls 3.8.14, so starting from there the build fails with a
+nothreads toolchain:
+
+    In file included from rnd.c:26:
+    ./../locks.h:77:9: error: unknown type name 'gl_once_t'
+       77 | typedef gl_once_t *gnutls_once_t;
+            |         ^~~~~~~~~
+    record.c:2181:8: error: 'errno' undeclared (first use in this function)
+
+Gnutls directly uses gl_once_t from once.h, so include it from
+lib/locks.h. Additionally two .c files relied on getting errno.h
+through gnulib's lock.h, which the same gnulib commit moved to the
+corresponding .c file, so it's no longer visible to use. Include
+errno.h directly here.
+
+[1] https://gitlab.com/libidn/gnulib-mirror/-/commit/250881c4f839e18737a1d6d807337a76015cc722
+[2] https://gitlab.com/gnutls/gnutls/-/commit/2635e27c1845f656f0a502854065f8b23ec2957f
+
+Upstream: https://gitlab.com/gnutls/gnutls/-/merge_requests/2192
+Reported-by: Bernd Kuhls <bernd@kuhls.net>
+[Drop bootstrap.conf hunk from upstream patch that's not relevant for
+building from release tarball]
+Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
+---
+ lib/kx.c     | 1 +
+ lib/locks.h  | 1 +
+ lib/record.c | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/lib/kx.c b/lib/kx.c
+index 4f417a20a..aa940f3e1 100644
+--- a/lib/kx.c
++++ b/lib/kx.c
+@@ -36,6 +36,7 @@
+ #include "state.h"
+ #include "datum.h"
+ #include "mbuffers.h"
++#include <errno.h>
+ 
+ /* This file contains important thing for the TLS handshake procedure.
+  */
+diff --git a/lib/locks.h b/lib/locks.h
+index 0e6275bb0..160e65598 100644
+--- a/lib/locks.h
++++ b/lib/locks.h
+@@ -27,6 +27,7 @@
+ #include "gnutls_int.h"
+ #include "system.h"
+ #include "glthread/lock.h"
++#include "glthread/once.h"
+ 
+ extern mutex_init_func gnutls_mutex_init;
+ extern mutex_deinit_func gnutls_mutex_deinit;
+diff --git a/lib/record.c b/lib/record.c
+index 67b0f7c55..dd3eec4f4 100644
+--- a/lib/record.c
++++ b/lib/record.c
+@@ -55,6 +55,7 @@
+ #include <xsize.h>
+ #include "locks.h"
+ #include "system/ktls.h"
++#include <errno.h>
+ #include <intprops.h>
+ 
+ struct tls_record_st {
+ 	uint16_t header_size;
+-- 
+2.56.1
diff --git a/package/gnutls/gnutls.hash b/package/gnutls/gnutls.hash
index 99a721d208..cd8a1ade12 100644
--- a/package/gnutls/gnutls.hash
+++ b/package/gnutls/gnutls.hash
@@ -1,6 +1,6 @@
 # Locally calculated after checking pgp signature
-# https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.13.tar.xz.sig
-sha256  ffed8ec1bf09c2426d4f14aae377de4753b53e537d685e604e99a8b16ca9c97e  gnutls-3.8.13.tar.xz
+# https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.14.tar.xz.sig
+sha256  7e2d258071f5db9620aa7ff34259331d004f7beafa3eb18560cfaf60acfbf02a  gnutls-3.8.14.tar.xz
 # Locally calculated
 sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  COPYING
 sha256  20e50fe7aae3e56378ebf0417d9de904f55a0e61e4df315333e632a4d3555d95  COPYING.LESSERv2
diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
index ae1caaa221..492e19e65f 100644
--- a/package/gnutls/gnutls.mk
+++ b/package/gnutls/gnutls.mk
@@ -6,7 +6,7 @@
 
 # When bumping, make sure *all* --without-libfoo-prefix options are in GNUTLS_CONF_OPTS
 GNUTLS_VERSION_MAJOR = 3.8
-GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).13
+GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).14
 GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz
 GNUTLS_SITE = https://www.gnupg.org/ftp/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR)
 GNUTLS_LICENSE = LGPL-2.1+ (core library)
-- 
2.56.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-26 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 10:43 [Buildroot] [PATCH] package/gnutls: security bump to version 3.8.14 Marcus Hoffmann via buildroot
2026-11-26 15:51 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox