diff --git a/backport-libblkid-Fix-crash-while-parsing-config-with-libecon.patch b/backport-libblkid-Fix-crash-while-parsing-config-with-libecon.patch new file mode 100644 index 0000000000000000000000000000000000000000..629b4db5dd3d2b8d007b08e4c9b59bfdd273775f --- /dev/null +++ b/backport-libblkid-Fix-crash-while-parsing-config-with-libecon.patch @@ -0,0 +1,34 @@ +From 284527cff2bd22da2924881a4a4833049dca0d2e Mon Sep 17 00:00:00 2001 +From: Stanislav Brabec +Date: Fri, 16 May 2025 03:10:14 +0200 +Subject: [PATCH] libblkid: Fix crash while parsing config with libeconf + +As the whole econf_file structure is freed by econf_free(file) at the end +of blkid_read_config(), econf_file structure cannot be defined as static +and initialized only once. The econf_free() is not robust enough and keeps +a pointer to the garbage after the first call of blkid_read_config(). And +if /etc/blkid.conf does not exist, it is called second time. + +Signed-off-by: Stanislav Brabec +Cc: Stefan Schubert +Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1242705 +--- + libblkid/src/config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libblkid/src/config.c b/libblkid/src/config.c +index 19c80ea..da49e7d 100644 +--- a/libblkid/src/config.c ++++ b/libblkid/src/config.c +@@ -153,7 +153,7 @@ struct blkid_config *blkid_read_config(const char *filename) + + #else /* !HAVE_LIBECONF */ + +- static econf_file *file = NULL; ++ econf_file *file = NULL; + char *line = NULL; + bool uevent = false; + econf_err error; +-- +2.43.0 + diff --git a/util-linux.spec b/util-linux.spec index c13ef735bd5d515671e14712e3b7817ae96c4a8b..5c7640cf58a5b32b5bd406a81bed537b80e34fa0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -3,7 +3,7 @@ Name: util-linux Version: 2.40.4 -Release: 13 +Release: 14 Summary: A random collection of Linux utilities License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git @@ -52,6 +52,7 @@ Patch6030: backport-libmount-verity-fix-deinitialization.patch Patch6031: backport-more-temporarily-ignore-stdin-when-waiting-for-stderr.patch Patch6032: backport-logger-fix-buffer-overflow-when-read-stdin.patch Patch6033: backport-hardlink-fix-memory-corruption-in-read-buffers.patch +Patch6034: backport-libblkid-Fix-crash-while-parsing-config-with-libecon.patch Patch9000: SKIPPED-no-root-permissions-test.patch Patch9001: util-linux-Add-sw64-architecture.patch @@ -419,6 +420,12 @@ fi %endif %changelog +* Wed Nov 5 2025 liuh - 2.40.4-14 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:backport-libblkid-Fix-crash-while-parsing-config-with-libecon.patch + * Tue Oct 21 2025 liuh - 2.40.4-13 - Type:bugfix - CVE:NA