summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/libarchive/libarchive/CVE-2025-5914.patch48
-rw-r--r--meta/recipes-extended/libarchive/libarchive_3.7.9.bb1
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2025-5914.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2025-5914.patch
new file mode 100644
index 0000000000..89022b38fd
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/CVE-2025-5914.patch
@@ -0,0 +1,48 @@
1From 09685126fcec664e2b8ca595e1fc371bd494d209 Mon Sep 17 00:00:00 2001
2From: Tobias Stoeckmann <stoeckmann@users.noreply.github.com>
3Date: Sun, 11 May 2025 02:17:19 +0200
4Subject: [PATCH] rar: Fix double free with over 4 billion nodes (#2598)
5
6If a system is capable of handling 4 billion nodes in memory, a double
7free could occur because of an unsigned integer overflow leading to a
8realloc call with size argument of 0. Eventually, the client will
9release that memory again, triggering a double free.
10
11Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
12
13CVE: CVE-2025-5914
14
15Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/09685126fcec664e2b8ca595e1fc371bd494d209]
16
17Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
18---
19 libarchive/archive_read_support_format_rar.c | 6 +++---
20 1 file changed, 3 insertions(+), 3 deletions(-)
21
22diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c
23index 9d155c6..9eb3c84 100644
24--- a/libarchive/archive_read_support_format_rar.c
25+++ b/libarchive/archive_read_support_format_rar.c
26@@ -335,8 +335,8 @@ struct rar
27 int found_first_header;
28 char has_endarc_header;
29 struct data_block_offsets *dbo;
30- unsigned int cursor;
31- unsigned int nodes;
32+ size_t cursor;
33+ size_t nodes;
34 char filename_must_match;
35
36 /* LZSS members */
37@@ -1186,7 +1186,7 @@ archive_read_format_rar_seek_data(struct archive_read *a, int64_t offset,
38 int whence)
39 {
40 int64_t client_offset, ret;
41- unsigned int i;
42+ size_t i;
43 struct rar *rar = (struct rar *)(a->format->data);
44
45 if (rar->compression_method == COMPRESS_METHOD_STORE)
46--
472.40.0
48
diff --git a/meta/recipes-extended/libarchive/libarchive_3.7.9.bb b/meta/recipes-extended/libarchive/libarchive_3.7.9.bb
index 4dd6794bb1..c26a14e32e 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.7.9.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.7.9.bb
@@ -31,6 +31,7 @@ EXTRA_OECONF += "--enable-largefile --without-iconv"
31 31
32SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ 32SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
33 file://configurehack.patch \ 33 file://configurehack.patch \
34 file://CVE-2025-5914.patch \
34 " 35 "
35UPSTREAM_CHECK_URI = "http://libarchive.org/" 36UPSTREAM_CHECK_URI = "http://libarchive.org/"
36 37