package/libtpms: fix build with host gcc >= 15.x
PATCH 1/2 package/libtpms: fix build with host gcc >= 15.x
Fixes:
https://autobuild.buildroot.net/results/7a6/7a6ea7c513e8f1dcc32d868108bfb2a907d6fe85/
The previous change to src/tpm_library.c dates back to 2024:
https://github.com/stefanberger/libtpms/commits/master/src/tpm_library.c
so a backport to buildroot LTS branches should be considered.
--- ...ilation-error-in-TPMLIB_GetPlaintext.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/libtpms/0001-Fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch
package/libtpms/0001-Fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch new file +40 -0
@@ -0,0 +1,40 @@ +From fc8820cfaa8b5e17328f731df93911f6ab92443b Mon Sep 17 00:00:00 2001 +From: Stefan Berger <[email protected]> +Date: Fri, 2 Jan 2026 11:37:31 -0500 +Subject: [PATCH] Fix a compilation error in TPMLIB_GetPlaintext + +Fix a compilation error that newer gcc versions may complain about: + +tpm_library.c: In function 'TPMLIB_GetPlaintext': +tpm_library.c:441:11: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] + 441 | start = strstr(stream, starttag); + | ^ +At top level: +cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics +cc1: all warnings being treated as errors + +Signed-off-by: Stefan Berger <[email protected]> + +Upstream: https://github.com/stefanberger/libtpms/commit/fc8820cfaa8b5e17328f731df93911f6ab92443b + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + src/tpm_library.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tpm_library.c b/src/tpm_library.c +index f48f4fd3..7b2ea687 100644 +--- a/src/tpm_library.c ++++ b/src/tpm_library.c +@@ -435,7 +435,7 @@ static unsigned char *TPMLIB_GetPlaintext(const char *stream, + const char *endtag, + size_t *length) + { +- char *start, *end; ++ const char *start, *end; + unsigned char *plaintext = NULL; + + start = strstr(stream, starttag); +-- +2.47.3 +
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/libtpms: security bump version to 0.10.2
https://github.com/stefanberger/libtpms/blob/v0.10.2/CHANGES
Fixes CVE-2026-21444.
Added comment to hash file about locally computed hashes.
--- package/libtpms/libtpms.hash | 3 ++- package/libtpms/libtpms.mk | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
package/libtpms/libtpms.hash +2 -1
@@ -1,2 +1,3 @@ -sha256 ebc24f3191d90f6cf0b4d4200cd876db4bd224b3c565708bbea0a82ee275e0fb libtpms-0.10.1.tar.gz +# Locally computed +sha256 edac03680f8a4a1c5c1d609a10e3f41e1a129e38ff5158f0c8deaedc719fb127 libtpms-0.10.2.tar.gz sha256 82f1e6bae374bb6a9d4f4596767fd33e499718d560de140fd9f3d402cc5e41fb LICENSE
package/libtpms/libtpms.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -LIBTPMS_VERSION = 0.10.1 +LIBTPMS_VERSION = 0.10.2 LIBTPMS_SITE = $(call github,stefanberger,libtpms,v$(LIBTPMS_VERSION)) LIBTPMS_LICENSE = BSD-4-Clause LIBTPMS_LICENSE_FILES = LICENSE
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedRe: [Buildroot] [PATCH 2/2] package/libtpms: security bump version to 0.10.2
In reply of:
Quoted 7 lines
https://github.com/stefanberger/libtpms/blob/v0.10.2/CHANGES
Fixes CVE-2026-21444.
Added comment to hash file about locally computed hashes.
Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2025.02.x, 2025.11.x & 2026.02.x. Thanks
Quoted 34 lines
--- package/libtpms/libtpms.hash | 3 ++- package/libtpms/libtpms.mk | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)package/libtpms/libtpms.hash +2
-1@@ -1,2 +1,3 @@ -sha256 ebc24f3191d90f6cf0b4d4200cd876db4bd224b3c565708bbea0a82ee275e0fb libtpms-0.10.1.tar.gz +# Locally computed +sha256 edac03680f8a4a1c5c1d609a10e3f41e1a129e38ff5158f0c8deaedc719fb127 libtpms-0.10.2.tar.gz sha256 82f1e6bae374bb6a9d4f4596767fd33e499718d560de140fd9f3d402cc5e41fb LICENSEpackage/libtpms/libtpms.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -LIBTPMS_VERSION = 0.10.1 +LIBTPMS_VERSION = 0.10.2 LIBTPMS_SITE = $(call github,stefanberger,libtpms,v$(LIBTPMS_VERSION)) LIBTPMS_LICENSE = BSD-4-Clause LIBTPMS_LICENSE_FILES = LICENSESignature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · Bernd Kuhls
Fixes:
https://autobuild.buildroot.net/results/7a6/7a6ea7c513e8f1dcc32d868108bfb2a907d6fe85/The previous change to
src/tpm_library.cdates back to 2024:
https://github.com/stefanberger/libtpms/commits/master/src/tpm_library.c
so a backport to buildroot LTS branches should be considered.Signed-off-by Bernd Kuhls <[email protected]>
Series applied to master, thanks.
For info, this issue happens only on hosts with glibc-2.43, so I added that comment in the title. See:
https://gitlab.com/buildroot.org/buildroot/-/commit/f773fd6787491af3c98ae30f5683b8d7a431b0e5
Best regards,
Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedIn reply of:
Quoted 8 lines
Fixes:
https://autobuild.buildroot.net/results/7a6/7a6ea7c513e8f1dcc32d868108bfb2a907d6fe85/The previous change to
src/tpm_library.cdates back to 2024:
https://github.com/stefanberger/libtpms/commits/master/src/tpm_library.c
so a backport to buildroot LTS branches should be considered.Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2025.02.x, 2025.11.x & 2026.02.x. Thanks
Quoted 58 lines
--- ...ilation-error-in-TPMLIB_GetPlaintext.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/libtpms/0001-Fix-a-compilation-error-in-TPMLIB_GetPlaintext.patchpackage/libtpms/0001-Fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch new file +40
-0@@ -0,0 +1,40 @@ +From fc8820cfaa8b5e17328f731df93911f6ab92443b Mon Sep 17 00:00:00 2001 +From: Stefan Berger <[email protected]> +Date: Fri, 2 Jan 2026 11:37:31 -0500 +Subject: [PATCH] Fix a compilation error in TPMLIB_GetPlaintext + +Fix a compilation error that newer gcc versions may complain about: + +tpm_library.c: In function 'TPMLIB_GetPlaintext': +tpm_library.c:441:11: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] + 441 | start = strstr(stream, starttag); + | ^ +At top level: +cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics +cc1: all warnings being treated as errors + +Signed-off-by: Stefan Berger <[email protected]> + +Upstream: https://github.com/stefanberger/libtpms/commit/fc8820cfaa8b5e17328f731df93911f6ab92443b + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + src/tpm_library.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tpm_library.c b/src/tpm_library.c +index f48f4fd3..7b2ea687 100644 +--- a/src/tpm_library.c ++++ b/src/tpm_library.c +@@ -435,7 +435,7 @@ static unsigned char *TPMLIB_GetPlaintext(const char *stream, + const char *endtag, + size_t *length) + { +- char *start, *end; ++ const char *start, *end; + unsigned char *plaintext = NULL; + + start = strstr(stream, starttag); +-- +2.47.3 +Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot