]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
libarchive: patch CVE-2025-25724
authorPeter Marko <peter.marko@siemens.com>
Wed, 12 Mar 2025 19:28:28 +0000 (20:28 +0100)
committerSteve Sakoman <steve@sakoman.com>
Thu, 13 Mar 2025 16:19:58 +0000 (09:19 -0700)
Pick commit referencing this MR which was merged to master.
Note that this commit also patched CVE-2025-1632 in bsdunzip, however
that utility was introduced only in 3.7.0, so that part is not
applicable in kirkstone.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-extended/libarchive/libarchive/CVE-2025-25724.patch [new file with mode: 0644]
meta/recipes-extended/libarchive/libarchive_3.6.2.bb

diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2025-25724.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2025-25724.patch
new file mode 100644 (file)
index 0000000..fe489e8
--- /dev/null
@@ -0,0 +1,40 @@
+From c9bc934e7e91d302e0feca6e713ccc38d6d01532 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Peter=20K=C3=A4stle?= <peter@piie.net>
+Date: Mon, 10 Mar 2025 16:43:04 +0100
+Subject: [PATCH] fix CVE-2025-1632 and CVE-2025-25724 (#2532)
+
+Hi,
+
+please find my approach to fix the CVE-2025-1632 and CVE-2025-25724
+vulnerabilities in this pr.
+As both error cases did trigger a NULL pointer deref (and triggered
+hopefully everywhere a coredump), we can safely replace the actual
+information by a predefined invalid string without breaking any
+functionality.
+
+CVE: CVE-2025-25724
+Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/c9bc934e7e91d302e0feca6e713ccc38d6d01532]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---------
+
+Signed-off-by: Peter Kaestle <peter@piie.net>
+---
+ tar/util.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tar/util.c b/tar/util.c
+index 3b099cb5..f3cbdf0b 100644
+--- a/tar/util.c
++++ b/tar/util.c
+@@ -758,7 +758,10 @@ list_item_verbose(struct bsdtar *bsdtar, FILE *out, struct archive_entry *entry)
+ #else
+       ltime = localtime(&tim);
+ #endif
+-      strftime(tmp, sizeof(tmp), fmt, ltime);
++      if (ltime)
++              strftime(tmp, sizeof(tmp), fmt, ltime);
++      else
++              sprintf(tmp, "-- -- ----");
+       fprintf(out, " %s ", tmp);
+       safe_fprintf(out, "%s", archive_entry_pathname(entry));
index 6af01cf408cc878f53e5ac361aa8a79252fc4d9a..4ceb0df2c042e9d42f1d070f9e2d7dde63f211e9 100644 (file)
@@ -34,6 +34,7 @@ SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
            file://CVE-2024-48957.patch \
            file://CVE-2024-48958.patch \
            file://CVE-2024-20696.patch \
+           file://CVE-2025-25724.patch \
            "
 UPSTREAM_CHECK_URI = "http://libarchive.org/"