Compare commits
No commits in common. "c8" and "c8-beta" have entirely different histories.
@ -1,42 +0,0 @@
|
||||
From 09685126fcec664e2b8ca595e1fc371bd494d209 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Stoeckmann <stoeckmann@users.noreply.github.com>
|
||||
Date: Sun, 11 May 2025 02:17:19 +0200
|
||||
Subject: [PATCH] rar: Fix double free with over 4 billion nodes (#2598)
|
||||
|
||||
If a system is capable of handling 4 billion nodes in memory, a double
|
||||
free could occur because of an unsigned integer overflow leading to a
|
||||
realloc call with size argument of 0. Eventually, the client will
|
||||
release that memory again, triggering a double free.
|
||||
|
||||
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
---
|
||||
libarchive/archive_read_support_format_rar.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c
|
||||
index 542532dd..197469b9 100644
|
||||
--- a/libarchive/archive_read_support_format_rar.c
|
||||
+++ b/libarchive/archive_read_support_format_rar.c
|
||||
@@ -335,8 +335,8 @@ struct rar
|
||||
int found_first_header;
|
||||
char has_endarc_header;
|
||||
struct data_block_offsets *dbo;
|
||||
- unsigned int cursor;
|
||||
- unsigned int nodes;
|
||||
+ size_t cursor;
|
||||
+ size_t nodes;
|
||||
char filename_must_match;
|
||||
|
||||
/* LZSS members */
|
||||
@@ -1192,7 +1192,7 @@ archive_read_format_rar_seek_data(struct archive_read *a, int64_t offset,
|
||||
int whence)
|
||||
{
|
||||
int64_t client_offset, ret;
|
||||
- unsigned int i;
|
||||
+ size_t i;
|
||||
struct rar *rar = (struct rar *)(a->format->data);
|
||||
|
||||
if (rar->compression_method == COMPRESS_METHOD_STORE)
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
# This patch originally consisted of 3 hunks on the upstream:
|
||||
# https://github.com/libarchive/libarchive/pull/2898/changes/e1907c5832b6489c7b4198b0825f857c93a03c10
|
||||
# https://github.com/libarchive/libarchive/pull/2898/changes/d379dc0b2976b7207d1ad78f5ed3eb99a5b6d375
|
||||
# but only the first hunk needs to be backported since the
|
||||
# logic fix the second hunk provides does not need to be added
|
||||
# as the logic is still correct in the current version of libarchive (3.3.3)
|
||||
# thus the vulnerability in the code does not yet exist
|
||||
#
|
||||
# the third hunk of the patch is not needed either as the part of
|
||||
# the code which contains the vulnerability is not yet present in this version (3.3.3)
|
||||
diff -Naur libarchive-3.3.3/libarchive/archive_read_support_format_rar.c libarchive-3.3.3_patched/libarchive/archive_read_support_format_rar.c
|
||||
--- libarchive-3.3.3/libarchive/archive_read_support_format_rar.c 2018-09-02 08:05:18.000000000 +0200
|
||||
+++ libarchive-3.3.3_patched/libarchive/archive_read_support_format_rar.c 2026-04-09 08:54:50.569789984 +0200
|
||||
@@ -2288,7 +2288,8 @@
|
||||
return (r);
|
||||
}
|
||||
|
||||
- if (!rar->dictionary_size || !rar->lzss.window)
|
||||
+ if (!rar->dictionary_size || !rar->lzss.window ||
|
||||
+ (unsigned int)(rar->lzss.mask + 1) < rar->dictionary_size)
|
||||
{
|
||||
/* Seems as though dictionary sizes are not used. Even so, minimize
|
||||
* memory usage as much as possible.
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,32 +0,0 @@
|
||||
From cd35cd9eef0416dbdf7448becce35c752fc3772a Mon Sep 17 00:00:00 2001
|
||||
From: Masahiro Matsuya <mmatsuya@redhat.com>
|
||||
Date: Fri, 5 Jan 2024 11:33:12 +0900
|
||||
Subject: [PATCH] skip-compression-level-1-test-on-s390x
|
||||
|
||||
---
|
||||
libarchive/test/test_write_filter_gzip.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libarchive/test/test_write_filter_gzip.c b/libarchive/test/test_write_filter_gzip.c
|
||||
index 935fb51..b824a77 100644
|
||||
--- a/libarchive/test/test_write_filter_gzip.c
|
||||
+++ b/libarchive/test/test_write_filter_gzip.c
|
||||
@@ -226,10 +226,15 @@ DEFINE_TEST(test_write_filter_gzip)
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
|
||||
assertEqualInt(ARCHIVE_OK, archive_write_free(a));
|
||||
|
||||
+ /* experiencing same size with compression-level=1 on s390x with libarchve-3.3.3
|
||||
+ * related to issues/1515.
|
||||
+ */
|
||||
+ #if !defined(__s390x__)
|
||||
/* Level 1 really does result in larger data. */
|
||||
failure("Compression-level=1 wrote %d bytes; default wrote %d bytes",
|
||||
(int)used2, (int)used1);
|
||||
assert(used2 > used1);
|
||||
+ #endif /* __s390x__ */
|
||||
|
||||
/* Basic gzip header tests */
|
||||
rbuff = (unsigned char *)buff;
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: libarchive
|
||||
Version: 3.3.3
|
||||
Release: 7%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: A library for handling streaming archive formats
|
||||
|
||||
License: BSD
|
||||
@ -25,13 +25,7 @@ Patch11: libarchive-3.3.3-CVE-2021-31566.patch
|
||||
# Source: https://github.com/libarchive/libarchive/commit/b1b501161013296d19dfe9acb84a341c8a1755b9
|
||||
Patch12: %{name}-3.3.3-Fix-size-filed-in-pax-header.patch
|
||||
Patch13: %{name}-3.3.3-Fix-CVE-2022-36227.patch
|
||||
Patch14: %{name}-3.3.3-Fix-CVE-2025-5914.patch
|
||||
Patch15: %{name}-3.3.3-skip-compression-level-1-check-on-s390x.patch
|
||||
# Source: https://github.com/libarchive/libarchive/pull/2898/changes/d379dc0b2976b7207d1ad78f5ed3eb99a5b6d375
|
||||
# and: https://github.com/libarchive/libarchive/pull/2898/changes/e1907c5832b6489c7b4198b0825f857c93a03c10
|
||||
Patch16: %{name}-3.3.3-Fix-CVE-2026-4424.patch
|
||||
# Source: https://github.com/libarchive/libarchive/pull/2934/changes/889a228b71f2b1fab8dc5610f6c43ac0e9b92160
|
||||
Patch17: %{name}-3.3.3-Fix-CVE-2026-5121.patch
|
||||
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: bison
|
||||
@ -238,15 +232,6 @@ run_testsuite
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Apr 08 2026 Pavol Sloboda <psloboda@redhat.com> - 3.3.3-7
|
||||
- Resolves: CVE-2026-4424
|
||||
- Resolves: CVE-2026-5121
|
||||
|
||||
* Wed Aug 13 2025 Lukas Javorsky <ljavorsk@redhat.com> - 3.3.3-6
|
||||
- Resolves: CVE-2025-5914
|
||||
- Skip compression-level=1 size check on s390x.
|
||||
- Related to https://github.com/libarchive/libarchive/issues/1515
|
||||
|
||||
* Tue Dec 06 2022 Lukas Javorsky <ljavorsk@redhat.com> - 3.3.3-5
|
||||
- Fix for CVE-2022-36227
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user