Complete Yocto mirror with license table for TQMa6UL (2038-compliance)

- 264 license table entries with exact download URLs (224/264 resolved)
- Complete sources/ directory with all BitBake recipes
- Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl)
- Full traceability for Softwarefreigabeantrag
- GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4
- License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
Siggi (OpenClaw Agent)
2026-03-01 20:58:18 +00:00
commit 16accb6b24
15086 changed files with 1292356 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
From 7be8ec59a53e93c2bd453b3ba2d63d1b300ef11f Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@fujitsu.com>
Date: Mon, 23 May 2022 10:44:43 +0900
Subject: [PATCH] Creating .hmac file should be excuted in target environment,
so deleted it from build process.
Upstream-Status: Inappropriate [https://gitlab.com/gnutls/gnutls/-/issues/1373]
Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
---
lib/Makefile.am | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index a50d311..193ea19 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -198,8 +198,7 @@ hmac_file = .libs/.$(gnutls_so).hmac
all-local: $(hmac_file)
-$(hmac_file): libgnutls.la fipshmac
- $(AM_V_GEN) $(builddir)/fipshmac > $@-t && mv $@-t $@
+.libs/.$(gnutls_so).hmac:
CLEANFILES = $(hmac_file)
endif

View File

@@ -0,0 +1,34 @@
From 208c6478d5c20b9d8a9f0a293e3808aa16ee091f Mon Sep 17 00:00:00 2001
From: Andrew Hamilton <adhamilt@gmail.com>
Date: Mon, 7 Jul 2025 10:31:55 +0900
Subject: [PATCH] psk: fix read buffer overrun in the "pre_shared_key"
extension
While processing the "pre_shared_key" extension in TLS 1.3, if there
are certain malformed data in the extension headers, then the code may
read uninitialized memory (2 bytes) beyond the received TLS extension
buffer. Spotted by oss-fuzz at:
https://issues.oss-fuzz.com/issues/42513990
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Upstream-Status: Backport [https://gitlab.com/gnutls/gnutls/-/commit/208c6478d5c20b9d8a9f0a293e3808aa16ee091f]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
lib/ext/pre_shared_key.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ext/pre_shared_key.c b/lib/ext/pre_shared_key.c
index 51c4891d5..2cb83e670 100644
--- a/lib/ext/pre_shared_key.c
+++ b/lib/ext/pre_shared_key.c
@@ -1170,6 +1170,8 @@ static int _gnutls_psk_recv_params(gnutls_session_t session,
if (session->security_parameters.entity == GNUTLS_CLIENT) {
if (session->internals.hsk_flags & HSK_PSK_KE_MODES_SENT) {
+ DECR_LEN(len, 2);
+
uint16_t selected_identity = _gnutls_read_uint16(data);
for (i = 0; i < sizeof(session->key.binders) /

View File

@@ -0,0 +1,37 @@
From 61c0505634a6faacf9fa0723843408aa0d3fb90a Mon Sep 17 00:00:00 2001
From: Andrew Hamilton <adhamilt@gmail.com>
Date: Mon, 7 Jul 2025 10:35:54 +0900
Subject: [PATCH] x509: reject zero-length version in certificate request
Ensure zero size asn1 values are considered invalid in
gnutls_x509_crq_get_version, this ensures crq version is not used
uninitialized. Spotted by oss-fuzz at:
https://issues.oss-fuzz.com/issues/42536706
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Upstream-Status: Backport [https://gitlab.com/gnutls/gnutls/-/commit/61c0505634a6faacf9fa0723843408aa0d3fb90a]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
lib/x509/crq.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/x509/crq.c b/lib/x509/crq.c
index 19e13623c..9e9801d2b 100644
--- a/lib/x509/crq.c
+++ b/lib/x509/crq.c
@@ -615,6 +615,13 @@ int gnutls_x509_crq_get_version(gnutls_x509_crq_t crq)
return _gnutls_asn2err(result);
}
+ /* Note that asn1_read_value can return success with */
+ /* len set to zero (without setting the data) in some */
+ /* conditions. */
+ if (unlikely(len <= 0)) {
+ return gnutls_assert_val(GNUTLS_E_ASN1_VALUE_NOT_VALID);
+ }
+
return (int)version[0] + 1;
}

View File

@@ -0,0 +1,57 @@
From ff6a345235b2585c261752e47a749228672b07dc Mon Sep 17 00:00:00 2001
From: Ravineet Singh <ravineet.a.singh@est.tech>
Date: Tue, 10 Jan 2023 16:11:10 +0100
Subject: [PATCH] gnutls: add ptest support
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Ravineet Singh <ravineet.a.singh@est.tech>
---
Makefile.am | 3 +++
configure.ac | 2 ++
tests/Makefile.am | 6 ++++++
3 files changed, 11 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 843193f..816b09f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -191,6 +191,9 @@ dist-hook:
mv ChangeLog $(distdir)
touch -c $(distdir)/doc/*.html $(distdir)/doc/*.pdf $(distdir)/doc/*.info
+install-ptest:
+ $(MAKE) -C tests DESTDIR=$(DESTDIR)/tests $@
+
.PHONY: abi-check abi-dump-versioned abi-dump-latest pic-check symbol-check local-code-coverage-output files-update AUTHORS
include $(top_srcdir)/cligen/cligen.mk
diff --git a/configure.ac b/configure.ac
index d6e03cf..e3f15fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1213,6 +1213,8 @@ AC_SUBST(LIBGNUTLS_CFLAGS)
AM_CONDITIONAL(NEEDS_LIBRT, test "$gnutls_needs_librt" = "yes")
+AM_EXTRA_RECURSIVE_TARGETS([buildtest-TESTS])
+
AC_DEFINE([GNUTLS_INTERNAL_BUILD], 1, [We allow temporarily usage of deprecated functions - until they are removed.])
hw_features=
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fb9e55a..c2d226a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -658,6 +658,12 @@ SH_LOG_COMPILER = $(SHELL)
AM_VALGRINDFLAGS = --suppressions=$(srcdir)/suppressions.valgrind
LOG_COMPILER = $(LOG_VALGRIND)
+install-ptest: $(check_PROGRAMS)
+ @$(INSTALL) -d $(DESTDIR)
+ @for file in $^; do \
+ $(INSTALL_PROGRAM) $$file $(DESTDIR) ; \
+ done
+
distclean-local:
rm -rf softhsm-*.db softhsm-*.config *.tmp tmp-* x509-crt-list-import-url.config.db port.lock.d

File diff suppressed because it is too large Load Diff

View File

@@ -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.8.4 (released 2024-03-18)
** libgnutls: RSA-OAEP encryption scheme is now supported
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
@@ -754,7 +754,6 @@ int _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);
}
@@ -763,7 +762,6 @@ int _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);
}

View File

@@ -0,0 +1,50 @@
From 8e5ca951257202089246fa37e93a99d210ee5ca2 Mon Sep 17 00:00:00 2001
From: Andrew Hamilton <adhamilt@gmail.com>
Date: Mon, 7 Jul 2025 10:23:59 +0900
Subject: [PATCH] x509: fix read buffer overrun in SCT timestamps
Prevent reading beyond heap buffer in call to _gnutls_parse_ct_sct
when processing x509 Signed Certificate Timestamps with certain
malformed data. Spotted by oss-fuzz at:
https://issues.oss-fuzz.com/issues/42530513
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Signed-off-by: Daiki Ueno <ueno@gnu.org>
CVE: CVE-2025-32989
Upstream-Status: Backport [https://gitlab.com/gnutls/gnutls/-/commit/8e5ca951257202089246fa37e93a99d210ee5ca2]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
NEWS | 5 +++++
lib/x509/x509_ext.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index 85efb5680..025e05148 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,11 @@ Copyright (C) 2000-2016 Free Software Foundation, Inc.
Copyright (C) 2013-2019 Nikos Mavrogiannopoulos
See the end for copying conditions.
+** libgnutls: Fix heap read buffer overrun in parsing X.509 SCTS timestamps
+ Spotted by oss-fuzz and reported by OpenAI Security Research Team,
+ and fix developed by Andrew Hamilton. [GNUTLS-SA-2025-07-07-1,
+ CVSS: medium] [CVE-2025-32989]
+
* Version 3.8.4 (released 2024-03-18)
** libgnutls: RSA-OAEP encryption scheme is now supported
diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c
index 064ca8357..05336a0c2 100644
--- a/lib/x509/x509_ext.c
+++ b/lib/x509/x509_ext.c
@@ -3757,7 +3757,7 @@ int gnutls_x509_ext_ct_import_scts(const gnutls_datum_t *ext,
}
length = _gnutls_read_uint16(scts_content.data);
- if (length < 4) {
+ if (length < 4 || length > scts_content.size) {
gnutls_free(scts_content.data);
return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,299 @@
From 23135619773e6ec087ff2abc65405bd4d5676bad Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@gnu.org>
Date: Mon, 7 Jul 2025 11:15:45 +0900
Subject: [PATCH] handshake: clear HSK_PSK_SELECTED is when resetting
binders
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When a TLS 1.3 handshake involves HRR and resumption or PSK, and the
second Client Hello omits PSK, the server would result in a NULL
pointer dereference as the PSK binder information is cleared while the
HSK_PSK_SELECTED flag is still set. This makes sure that
HSK_PSK_SELECTED flag is always cleared when the PSK binders are
reset. This also makes it clear the HSK_PSK_SELECTED flag is valid
only during a handshake; after that, whether PSK is used can be
checked with gnutls_auth_client_get_type.
Reported by Stefan Bühler.
Signed-off-by: Daiki Ueno <ueno@gnu.org>
CVE: CVE-2025-6395
Upstream-Status: Backport [https://gitlab.com/gnutls/gnutls/-/commit/23135619773e6ec087ff2abc65405bd4d5676bad]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
NEWS | 4 +
lib/handshake.c | 25 +++-
lib/state.c | 4 +-
tests/Makefile.am | 2 +
tests/tls13/hello_retry_request_psk.c | 173 ++++++++++++++++++++++++++
5 files changed, 204 insertions(+), 4 deletions(-)
create mode 100644 tests/tls13/hello_retry_request_psk.c
diff --git a/NEWS b/NEWS
index 1334516c6..d800e83b0 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,10 @@ Copyright (C) 2000-2016 Free Software Foundation, Inc.
Copyright (C) 2013-2019 Nikos Mavrogiannopoulos
See the end for copying conditions.
+** libgnutls: Fix NULL pointer dereference when 2nd Client Hello omits PSK
+ Reported by Stefan Bühler. [GNUTLS-SA-2025-07-07-4, CVSS: medium]
+ [CVE-2025-6395]
+
** libgnutls: Fix heap read buffer overrun in parsing X.509 SCTS timestamps
Spotted by oss-fuzz and reported by OpenAI Security Research Team,
and fix developed by Andrew Hamilton. [GNUTLS-SA-2025-07-07-1,
diff --git a/lib/handshake.c b/lib/handshake.c
index 722307be7..489d02194 100644
--- a/lib/handshake.c
+++ b/lib/handshake.c
@@ -589,9 +589,28 @@ static int set_auth_types(gnutls_session_t session)
/* Under TLS1.3 this returns a KX which matches the negotiated
* groups from the key shares; if we are resuming then the KX seen
* here doesn't match the original session. */
- if (!session->internals.resumed)
- kx = gnutls_kx_get(session);
- else
+ if (!session->internals.resumed) {
+ const gnutls_group_entry_st *group = get_group(session);
+
+ if (session->internals.hsk_flags & HSK_PSK_SELECTED) {
+ if (group) {
+ kx = group->pk == GNUTLS_PK_DH ?
+ GNUTLS_KX_DHE_PSK :
+ GNUTLS_KX_ECDHE_PSK;
+ } else {
+ kx = GNUTLS_KX_PSK;
+ }
+ } else if (group) {
+ /* Not necessarily be RSA, but just to
+ * make _gnutls_map_kx_get_cred below
+ * work.
+ */
+ kx = group->pk == GNUTLS_PK_DH ?
+ GNUTLS_KX_DHE_RSA :
+ GNUTLS_KX_ECDHE_RSA;
+ } else
+ kx = GNUTLS_KX_UNKNOWN;
+ } else
kx = GNUTLS_KX_UNKNOWN;
} else {
/* TLS1.2 or earlier, kx is associated with ciphersuite */
diff --git a/lib/state.c b/lib/state.c
index ec514c0cd..10ec0eadb 100644
--- a/lib/state.c
+++ b/lib/state.c
@@ -202,7 +202,8 @@ gnutls_kx_algorithm_t gnutls_kx_get(gnutls_session_t session)
const gnutls_group_entry_st *group = get_group(session);
if (ver->tls13_sem) {
- if (session->internals.hsk_flags & HSK_PSK_SELECTED) {
+ if (gnutls_auth_client_get_type(session) ==
+ GNUTLS_CRD_PSK) {
if (group) {
if (group->pk == GNUTLS_PK_DH)
return GNUTLS_KX_DHE_PSK;
@@ -349,6 +350,7 @@ void reset_binders(gnutls_session_t session)
_gnutls_free_temp_key_datum(&session->key.binders[0].psk);
_gnutls_free_temp_key_datum(&session->key.binders[1].psk);
memset(session->key.binders, 0, sizeof(session->key.binders));
+ session->internals.hsk_flags &= ~HSK_PSK_SELECTED;
}
/* Check whether certificate credentials of type @cert_type are set
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c2d226a00..e43faf10f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -128,6 +128,8 @@ ctests += tls13/hello_retry_request
ctests += tls13/hello_retry_request_resume
+ctests += tls13/hello_retry_request_psk
+
ctests += tls13/psk-ext
ctests += tls13/key_update
diff --git a/tests/tls13/hello_retry_request_psk.c b/tests/tls13/hello_retry_request_psk.c
new file mode 100644
index 000000000..a20cb0d96
--- /dev/null
+++ b/tests/tls13/hello_retry_request_psk.c
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2017-2025 Red Hat, Inc.
+ *
+ * Author: Nikos Mavrogiannopoulos, Daiki Ueno
+ *
+ * This file is part of GnuTLS.
+ *
+ * GnuTLS is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuTLS is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#include <string.h>
+#include <gnutls/gnutls.h>
+#include <assert.h>
+
+#include "cert-common.h"
+#include "utils.h"
+#include "tls13/ext-parse.h"
+#include "eagain-common.h"
+
+/* This program exercises the case where a TLS 1.3 handshake ends up
+ * with HRR, and the first CH includes PSK while the 2nd CH omits
+ * it */
+
+const char *testname = "hello entry request";
+
+const char *side = "";
+
+#define myfail(fmt, ...) fail("%s: " fmt, testname, ##__VA_ARGS__)
+
+static void tls_log_func(int level, const char *str)
+{
+ fprintf(stderr, "%s|<%d>| %s", side, level, str);
+}
+
+struct ctx_st {
+ unsigned hrr_seen;
+ unsigned hello_counter;
+};
+
+static int pskfunc(gnutls_session_t session, const char *username,
+ gnutls_datum_t *key)
+{
+ if (debug)
+ printf("psk: username %s\n", username);
+ key->data = gnutls_malloc(4);
+ key->data[0] = 0xDE;
+ key->data[1] = 0xAD;
+ key->data[2] = 0xBE;
+ key->data[3] = 0xEF;
+ key->size = 4;
+ return 0;
+}
+
+static int hello_callback(gnutls_session_t session, unsigned int htype,
+ unsigned post, unsigned int incoming,
+ const gnutls_datum_t *msg)
+{
+ struct ctx_st *ctx = gnutls_session_get_ptr(session);
+ assert(ctx != NULL);
+
+ if (htype == GNUTLS_HANDSHAKE_HELLO_RETRY_REQUEST)
+ ctx->hrr_seen = 1;
+
+ if (htype == GNUTLS_HANDSHAKE_CLIENT_HELLO) {
+ if (post == GNUTLS_HOOK_POST)
+ ctx->hello_counter++;
+ else {
+ /* Unset the PSK credential to omit the extension */
+ gnutls_credentials_set(session, GNUTLS_CRD_PSK, NULL);
+ }
+ }
+
+ return 0;
+}
+
+void doit(void)
+{
+ int sret, cret;
+ gnutls_psk_server_credentials_t scred;
+ gnutls_psk_client_credentials_t ccred;
+ gnutls_certificate_credentials_t ccred2;
+ gnutls_session_t server, client;
+ /* Need to enable anonymous KX specifically. */
+ const gnutls_datum_t key = { (void *)"DEADBEEF", 8 };
+
+ struct ctx_st ctx;
+ memset(&ctx, 0, sizeof(ctx));
+
+ global_init();
+
+ gnutls_global_set_log_function(tls_log_func);
+ if (debug)
+ gnutls_global_set_log_level(9);
+
+ /* Init server */
+ assert(gnutls_psk_allocate_server_credentials(&scred) >= 0);
+ gnutls_psk_set_server_credentials_function(scred, pskfunc);
+
+ gnutls_init(&server, GNUTLS_SERVER);
+
+ assert(gnutls_priority_set_direct(
+ server,
+ "NORMAL:-VERS-ALL:+VERS-TLS1.3:-GROUP-ALL:+GROUP-X25519:+DHE-PSK",
+ NULL) >= 0);
+
+ gnutls_credentials_set(server, GNUTLS_CRD_PSK, scred);
+ gnutls_transport_set_push_function(server, server_push);
+ gnutls_transport_set_pull_function(server, server_pull);
+ gnutls_transport_set_ptr(server, server);
+
+ /* Init client */
+ assert(gnutls_psk_allocate_client_credentials(&ccred) >= 0);
+ gnutls_psk_set_client_credentials(ccred, "test", &key,
+ GNUTLS_PSK_KEY_HEX);
+ assert(gnutls_certificate_allocate_credentials(&ccred2) >= 0);
+
+ assert(gnutls_init(&client, GNUTLS_CLIENT | GNUTLS_KEY_SHARE_TOP) >= 0);
+
+ gnutls_session_set_ptr(client, &ctx);
+
+ cret = gnutls_priority_set_direct(
+ client,
+ "NORMAL:-VERS-ALL:+VERS-TLS1.3:-GROUP-ALL:+GROUP-SECP256R1:+GROUP-X25519:+DHE-PSK",
+ NULL);
+ if (cret < 0)
+ myfail("cannot set TLS 1.3 priorities\n");
+
+ gnutls_credentials_set(client, GNUTLS_CRD_PSK, ccred);
+ gnutls_credentials_set(client, GNUTLS_CRD_CERTIFICATE, ccred2);
+ gnutls_transport_set_push_function(client, client_push);
+ gnutls_transport_set_pull_function(client, client_pull);
+ gnutls_transport_set_ptr(client, client);
+
+ gnutls_handshake_set_hook_function(client, GNUTLS_HANDSHAKE_ANY,
+ GNUTLS_HOOK_BOTH, hello_callback);
+
+ HANDSHAKE_EXPECT(client, server, GNUTLS_E_AGAIN,
+ GNUTLS_E_INSUFFICIENT_CREDENTIALS);
+
+ assert(ctx.hrr_seen != 0);
+
+ gnutls_bye(client, GNUTLS_SHUT_WR);
+ gnutls_bye(server, GNUTLS_SHUT_WR);
+
+ gnutls_deinit(client);
+ gnutls_deinit(server);
+
+ gnutls_psk_free_server_credentials(scred);
+ gnutls_psk_free_client_credentials(ccred);
+ gnutls_certificate_free_credentials(ccred2);
+
+ gnutls_global_deinit();
+ reset_buffers();
+}

View File

@@ -0,0 +1,29 @@
From d17ae0ef31c3c186766a338e8c40c87d1b98820e Mon Sep 17 00:00:00 2001
From: Joe Slater <jslater@windriver.com>
Date: Wed, 25 Jan 2017 13:52:59 -0800
Subject: [PATCH] gnutls: account for ARM_EABI
Certain syscall's are not availabe for arm-eabi, so we eliminate
reference to them.
Upstream-Status: Pending
Signed-off-by: Joe Slater <jslater@windriver.com>
---
tests/seccomp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/seccomp.c b/tests/seccomp.c
index 881f0bb..5f9204a 100644
--- a/tests/seccomp.c
+++ b/tests/seccomp.c
@@ -55,7 +55,9 @@ int disable_system_calls(void)
ADD_SYSCALL(nanosleep, 0);
ADD_SYSCALL(clock_nanosleep, 0);
+#if ! defined(__ARM_EABI__)
ADD_SYSCALL(time, 0);
+#endif
ADD_SYSCALL(getpid, 0);
ADD_SYSCALL(gettimeofday, 0);
#if defined(HAVE_CLOCK_GETTIME)

View File

@@ -0,0 +1,100 @@
#!/bin/sh
rjob() {
local job=$1
local log=$2
# TODO: Output will be garbled
./${job} >> ${log} 2>&1
ret=$?
case $ret in
0)
echo "PASS: $t" >> ${log}
echo "PASS: $t"
;;
77)
echo "SKIP: $t" >> ${log}
echo "SKIP: $t"
;;
*)
echo "FAIL: $t" >> ${log}
echo "FAIL: $t"
;;
esac
}
is_disallowed() {
local key=$1
$(echo ${test_disallowlist} | grep -w -q ${key})
return $?
}
# TODO
# This list should probably be in a external file
# Testcases defined here either take very long time (dtls-stress)
# or are dependent on local files (certs, etc) in local file system
# currently not exported to target.
test_disallowlist=""
test_disallowlist="${test_disallowlist} dtls-stress"
test_disallowlist="${test_disallowlist} handshake-large-cert"
test_disallowlist="${test_disallowlist} id-on-xmppAddr"
test_disallowlist="${test_disallowlist} mini-x509-cas"
test_disallowlist="${test_disallowlist} pkcs12_simple"
test_disallowlist="${test_disallowlist} protocol-set-allowlist"
test_disallowlist="${test_disallowlist} psk-file"
test_disallowlist="${test_disallowlist} rawpk-api"
test_disallowlist="${test_disallowlist} set_pkcs12_cred"
test_disallowlist="${test_disallowlist} system-override-curves-allowlist"
test_disallowlist="${test_disallowlist} system-override-hash"
test_disallowlist="${test_disallowlist} system-override-sig"
test_disallowlist="${test_disallowlist} system-override-sig-tls"
test_disallowlist="${test_disallowlist} system-prio-file"
test_disallowlist="${test_disallowlist} x509cert-tl"
LOG=${PWD}/tests.log
cd tests
max_njobs=$(grep -c ^processor /proc/cpuinfo)
njobs=0
set +e
for t in *; do
[ -x $t ] || continue
[ -f $t ] || continue
is_disallowed ${t}
[ $? -eq 0 ] && continue
rjob ${t} ${LOG} &
one=1
njobs=$(expr ${njobs} + ${one})
if [ ${njobs} -eq ${max_njobs} ]; then
wait
njobs=0
fi
done
wait
skipped=$(grep -c SKIP ${LOG})
passed=$(grep -c PASS ${LOG})
failed=$(grep -c FAIL ${LOG})
total=$(expr ${passed} + ${failed} + ${skipped})
if [ ${failed} -ne 0 ]; then
echo
echo "Tests failed for gnutls, log is:"
echo "--------------------"
cat ${LOG}
echo
fi
echo
echo "gnutls test summary:"
echo "--------------------"
echo "total: ${total}"
echo "pass : ${passed}"
echo "fail : ${failed}"
echo "skip : ${skipped}"
echo

View File

@@ -0,0 +1,116 @@
SUMMARY = "GNU Transport Layer Security Library"
DESCRIPTION = "a secure communications library implementing the SSL, \
TLS and DTLS protocols and technologies around them."
HOMEPAGE = "https://gnutls.org/"
BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
LICENSE = "GPL-3.0-or-later & LGPL-2.1-or-later"
LICENSE:${PN} = "LGPL-2.1-or-later"
LICENSE:${PN}-xx = "LGPL-2.1-or-later"
LICENSE:${PN}-bin = "GPL-3.0-or-later"
LICENSE:${PN}-openssl = "GPL-3.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \
file://doc/COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
file://doc/COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c"
DEPENDS = "nettle gmp virtual/libiconv libunistring"
SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \
file://arm_eabi.patch \
file://0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch \
file://run-ptest \
file://Add-ptest-support.patch \
file://CVE-2024-12243.patch \
file://CVE-2025-32989.patch \
file://04939b75417cc95b7372c6f208c4bda4579bdc34 \
file://0001-psk-fix-read-buffer-overrun-in-the-pre_shared_key-ex.patch \
file://5477db1bb507a35e8833c758ce344f4b5b246d8e \
file://0001-x509-reject-zero-length-version-in-certificate-reque.patch \
file://3e94dcdff862ef5d6db8b5cc8e59310b5f0cdfe2 \
file://CVE-2025-32988.patch \
file://CVE-2025-32990.patch \
file://CVE-2025-6395.patch \
"
SRC_URI[sha256sum] = "2bea4e154794f3f00180fa2a5c51fe8b005ac7a31cd58bd44cdfa7f36ebc3a9b"
inherit autotools texinfo pkgconfig gettext lib_package gtk-doc ptest
PACKAGECONFIG ??= "libidn libtasn1 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
# You must also have CONFIG_SECCOMP enabled in the kernel for
# seccomp to work.
PACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_EXECPREFIXDIR},ac_cv_libseccomp=no,libseccomp"
PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2"
PACKAGECONFIG[libtasn1] = "--without-included-libtasn1,--with-included-libtasn1,libtasn1"
PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
PACKAGECONFIG[fips] = "--enable-fips140-mode --with-libdl-prefix=${STAGING_BASELIBDIR}"
PACKAGECONFIG[dane] = "--enable-libdane,--disable-libdane,unbound"
# Certificate compression
PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli"
PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
EXTRA_OECONF = " \
--enable-doc \
--disable-rpath \
--enable-openssl-compatibility \
--with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
--with-librt-prefix=${STAGING_DIR_HOST}${prefix} \
--with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \
"
# Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell.
export POSIX_SHELL="${base_bindir}/sh"
do_configure:prepend() {
for dir in . lib; do
rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
done
# binary files cannot be delivered as diff
mkdir -p ${S}/fuzz/gnutls_x509_parser_fuzzer.repro/ ${S}/fuzz/gnutls_psk_client_fuzzer.repro/ ${S}/fuzz/gnutls_x509_crq_parser_fuzzer.repro/
cp ${WORKDIR}/04939b75417cc95b7372c6f208c4bda4579bdc34 ${S}/fuzz/gnutls_x509_parser_fuzzer.repro/
cp ${WORKDIR}/5477db1bb507a35e8833c758ce344f4b5b246d8e ${S}/fuzz/gnutls_psk_client_fuzzer.repro/
cp ${WORKDIR}/3e94dcdff862ef5d6db8b5cc8e59310b5f0cdfe2 ${S}/fuzz/gnutls_x509_crq_parser_fuzzer.repro/
}
do_compile_ptest() {
oe_runmake -C tests buildtest-TESTS
}
do_install:append:class-target() {
if ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'true', 'false', d)}; then
install -d ${D}${bindir}/bin
install -m 0755 ${B}/lib/.libs/fipshmac ${D}/${bindir}/
fi
}
PACKAGES =+ "${PN}-dane ${PN}-openssl ${PN}-xx ${PN}-fips"
FILES:${PN}-dev += "${bindir}/gnutls-cli-debug"
FILES:${PN}-dane = "${libdir}/libgnutls-dane.so.*"
FILES:${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
FILES:${PN}-xx = "${libdir}/libgnutlsxx.so.*"
FILES:${PN}-fips = "${bindir}/fipshmac"
RDEPENDS:${PN}-ptest += "python3"
BBCLASSEXTEND = "native nativesdk"
pkg_postinst_ontarget:${PN}-fips () {
if test -x ${bindir}/fipshmac
then
mkdir ${sysconfdir}/gnutls
touch ${sysconfdir}/gnutls/config
${bindir}/fipshmac ${libdir}/libgnutls.so.30.*.* > ${libdir}/.libgnutls.so.30.hmac
${bindir}/fipshmac ${libdir}/libnettle.so.8.* > ${libdir}/.libnettle.so.8.hmac
${bindir}/fipshmac ${libdir}/libgmp.so.10.*.* > ${libdir}/.libgmp.so.10.hmac
${bindir}/fipshmac ${libdir}/libhogweed.so.6.* > ${libdir}/.libhogweed.so.6.hmac
fi
}

View File

@@ -0,0 +1,26 @@
From 629fc6427710e48b78f8b1f300dd698fe898cfd4 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Mon, 7 Jan 2013 01:49:40 +0200
Subject: [PATCH] libtasn1: remove help2man dependency
Upstream-Status: Inappropriate
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
doc/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index a0171a5..8aa4d3d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -28,7 +28,7 @@ libtasn1_TEXINFOS += asn1Coding-help.texi asn1Decoding-help.texi asn1Parser-help
AM_MAKEINFOHTMLFLAGS = --no-split $(AM_MAKEINFOFLAGS)
-dist_man_MANS = $(gdoc_MANS) asn1Parser.1 asn1Coding.1 asn1Decoding.1
+dist_man_MANS = $(gdoc_MANS)
HELP2MAN_OPTS = --info-page libtasn1

View File

@@ -0,0 +1,22 @@
SUMMARY = "Library for ASN.1 and DER manipulation"
DESCRIPTION = "A highly portable C library that encodes and decodes \
DER/BER data following an ASN.1 schema. "
HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
LICENSE = "GPL-3.0-or-later & LGPL-2.1-or-later"
LICENSE:${PN}-bin = "GPL-3.0-or-later"
LICENSE:${PN} = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
file://COPYING.LESSERv2;md5=4bf661c1e3793e55c8d1051bc5e0ae21"
SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
file://dont-depend-on-help2man.patch \
"
DEPENDS = "bison-native"
SRC_URI[sha256sum] = "92e0e3bd4c02d4aeee76036b2ddd83f0c732ba4cda5cb71d583272b23587a76c"
inherit autotools texinfo lib_package gtk-doc
BBCLASSEXTEND = "native nativesdk"