summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Pinnell McAllister <colin.mcallister@garmin.com>2025-06-30 09:37:53 -0500
committerSteve Sakoman <steve@sakoman.com>2025-07-09 08:23:23 -0700
commit8a1287dec6aa32195de6e451e0d30c61d4ea713f (patch)
tree8852a41222ac324f8003d264c822889def0204c0
parent78c9cb3eaf071932567835742608404d5ce23cc4 (diff)
downloadpoky-8a1287dec6aa32195de6e451e0d30c61d4ea713f.tar.gz
libarchive: Fix CVE-2025-5914
Adds patch to backport fix for CVE-2025-5914. (From OE-Core rev: 4a4c6e0382834e03480e07f30ed5efa23f6c6fe2) Signed-off-by: Colin Pinnell McAllister <colin.mcallister@garmin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-extended/libarchive/libarchive/CVE-2025-5914.patch46
-rw-r--r--meta/recipes-extended/libarchive/libarchive_3.6.2.bb1
2 files changed, 47 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..5607420093
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/CVE-2025-5914.patch
@@ -0,0 +1,46 @@
1From cb0d2b0c9a7f1672d4edaa4beacdd96e5b53ead1 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
14Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/09685126fcec664e2b8ca595e1fc371bd494d209]
15Signed-off-by: Colin Pinnell McAllister <colin.mcallister@garmin.com>
16---
17 libarchive/archive_read_support_format_rar.c | 6 +++---
18 1 file changed, 3 insertions(+), 3 deletions(-)
19
20diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c
21index 793e8e98..b9f5450d 100644
22--- a/libarchive/archive_read_support_format_rar.c
23+++ b/libarchive/archive_read_support_format_rar.c
24@@ -335,8 +335,8 @@ struct rar
25 int found_first_header;
26 char has_endarc_header;
27 struct data_block_offsets *dbo;
28- unsigned int cursor;
29- unsigned int nodes;
30+ size_t cursor;
31+ size_t nodes;
32 char filename_must_match;
33
34 /* LZSS members */
35@@ -1186,7 +1186,7 @@ archive_read_format_rar_seek_data(struct archive_read *a, int64_t offset,
36 int whence)
37 {
38 int64_t client_offset, ret;
39- unsigned int i;
40+ size_t i;
41 struct rar *rar = (struct rar *)(a->format->data);
42
43 if (rar->compression_method == COMPRESS_METHOD_STORE)
44--
452.49.0
46
diff --git a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb
index 87d3794ab7..4d0e3f7179 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb
@@ -35,6 +35,7 @@ SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
35 file://CVE-2024-48958.patch \ 35 file://CVE-2024-48958.patch \
36 file://CVE-2024-20696.patch \ 36 file://CVE-2024-20696.patch \
37 file://CVE-2025-25724.patch \ 37 file://CVE-2025-25724.patch \
38 file://CVE-2025-5914.patch \
38 " 39 "
39UPSTREAM_CHECK_URI = "http://libarchive.org/" 40UPSTREAM_CHECK_URI = "http://libarchive.org/"
40 41