diff options
| -rw-r--r-- | meta/recipes-extended/libarchive/libarchive/CVE-2025-1632_CVE-2025-25724.patch | 83 | ||||
| -rw-r--r-- | meta/recipes-extended/libarchive/libarchive_3.7.4.bb | 1 |
2 files changed, 84 insertions, 0 deletions
diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2025-1632_CVE-2025-25724.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2025-1632_CVE-2025-25724.patch new file mode 100644 index 0000000000..459b664180 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/CVE-2025-1632_CVE-2025-25724.patch | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | From c9bc934e7e91d302e0feca6e713ccc38d6d01532 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Peter=20K=C3=A4stle?= <peter@piie.net> | ||
| 3 | Date: Mon, 10 Mar 2025 16:43:04 +0100 | ||
| 4 | Subject: [PATCH] fix CVE-2025-1632 and CVE-2025-25724 (#2532) | ||
| 5 | |||
| 6 | Hi, | ||
| 7 | |||
| 8 | please find my approach to fix the CVE-2025-1632 and CVE-2025-25724 | ||
| 9 | vulnerabilities in this pr. | ||
| 10 | As both error cases did trigger a NULL pointer deref (and triggered | ||
| 11 | hopefully everywhere a coredump), we can safely replace the actual | ||
| 12 | information by a predefined invalid string without breaking any | ||
| 13 | functionality. | ||
| 14 | |||
| 15 | CVE: CVE-2025-1632 | ||
| 16 | CVE: CVE-2025-25724 | ||
| 17 | Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/c9bc934e7e91d302e0feca6e713ccc38d6d01532] | ||
| 18 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 19 | --------- | ||
| 20 | |||
| 21 | Signed-off-by: Peter Kaestle <peter@piie.net> | ||
| 22 | --- | ||
| 23 | tar/util.c | 5 ++++- | ||
| 24 | unzip/bsdunzip.c | 10 +++++++--- | ||
| 25 | 2 files changed, 11 insertions(+), 4 deletions(-) | ||
| 26 | |||
| 27 | diff --git a/tar/util.c b/tar/util.c | ||
| 28 | index 3b099cb5..f3cbdf0b 100644 | ||
| 29 | --- a/tar/util.c | ||
| 30 | +++ b/tar/util.c | ||
| 31 | @@ -748,7 +748,10 @@ list_item_verbose(struct bsdtar *bsdtar, FILE *out, struct archive_entry *entry) | ||
| 32 | #else | ||
| 33 | ltime = localtime(&tim); | ||
| 34 | #endif | ||
| 35 | - strftime(tmp, sizeof(tmp), fmt, ltime); | ||
| 36 | + if (ltime) | ||
| 37 | + strftime(tmp, sizeof(tmp), fmt, ltime); | ||
| 38 | + else | ||
| 39 | + sprintf(tmp, "-- -- ----"); | ||
| 40 | fprintf(out, " %s ", tmp); | ||
| 41 | safe_fprintf(out, "%s", archive_entry_pathname(entry)); | ||
| 42 | |||
| 43 | diff --git a/unzip/bsdunzip.c b/unzip/bsdunzip.c | ||
| 44 | index 7c8cafc3..4a9028b7 100644 | ||
| 45 | --- a/unzip/bsdunzip.c | ||
| 46 | +++ b/unzip/bsdunzip.c | ||
| 47 | @@ -904,6 +904,7 @@ list(struct archive *a, struct archive_entry *e) | ||
| 48 | char buf[20]; | ||
| 49 | time_t mtime; | ||
| 50 | struct tm *tm; | ||
| 51 | + const char *pathname; | ||
| 52 | |||
| 53 | mtime = archive_entry_mtime(e); | ||
| 54 | tm = localtime(&mtime); | ||
| 55 | @@ -912,22 +913,25 @@ list(struct archive *a, struct archive_entry *e) | ||
| 56 | else | ||
| 57 | strftime(buf, sizeof(buf), "%m-%d-%g %R", tm); | ||
| 58 | |||
| 59 | + pathname = archive_entry_pathname(e); | ||
| 60 | + if (!pathname) | ||
| 61 | + pathname = ""; | ||
| 62 | if (!zipinfo_mode) { | ||
| 63 | if (v_opt == 1) { | ||
| 64 | printf(" %8ju %s %s\n", | ||
| 65 | (uintmax_t)archive_entry_size(e), | ||
| 66 | - buf, archive_entry_pathname(e)); | ||
| 67 | + buf, pathname); | ||
| 68 | } else if (v_opt == 2) { | ||
| 69 | printf("%8ju Stored %7ju 0%% %s %08x %s\n", | ||
| 70 | (uintmax_t)archive_entry_size(e), | ||
| 71 | (uintmax_t)archive_entry_size(e), | ||
| 72 | buf, | ||
| 73 | 0U, | ||
| 74 | - archive_entry_pathname(e)); | ||
| 75 | + pathname); | ||
| 76 | } | ||
| 77 | } else { | ||
| 78 | if (Z1_opt) | ||
| 79 | - printf("%s\n",archive_entry_pathname(e)); | ||
| 80 | + printf("%s\n", pathname); | ||
| 81 | } | ||
| 82 | ac(archive_read_data_skip(a)); | ||
| 83 | } | ||
diff --git a/meta/recipes-extended/libarchive/libarchive_3.7.4.bb b/meta/recipes-extended/libarchive/libarchive_3.7.4.bb index 80b2e49eac..156a6bdaae 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.7.4.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.7.4.bb | |||
| @@ -34,6 +34,7 @@ SRC_URI += "file://configurehack.patch \ | |||
| 34 | file://CVE-2024-48957.patch \ | 34 | file://CVE-2024-48957.patch \ |
| 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-1632_CVE-2025-25724.patch \ | ||
| 37 | " | 38 | " |
| 38 | UPSTREAM_CHECK_URI = "http://libarchive.org/" | 39 | UPSTREAM_CHECK_URI = "http://libarchive.org/" |
| 39 | 40 | ||
