diff --git a/backport-fix-CVE-2024-48957.patch b/backport-fix-CVE-2024-48957.patch new file mode 100644 index 0000000000000000000000000000000000000000..1e568e98ffbaacdcb8eecc73db6dba7bc19ba4f2 --- /dev/null +++ b/backport-fix-CVE-2024-48957.patch @@ -0,0 +1,30 @@ +From 3ad7b9b6cc37d8a197a6c55af4634560df13771f Mon Sep 17 00:00:00 2001 +From: Wei-Cheng Pan +Date: Wed, 9 Oct 2024 06:49:13 +0800 +Subject: [PATCH] fix CVE-2024-48957 + +--- + libarchive/archive_read_support_format_rar.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 69fe4fa..3e07b4b 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -3715,6 +3715,13 @@ execute_filter_audio(struct rar_filter *filter, struct rar_virtual_machine *vm) + memset(&state, 0, sizeof(state)); + for (j = i; j < length; j += numchannels) + { ++ /* ++ * The src block should not overlap with the dst block. ++ * If so it would be better to consider this archive is broken. ++ */ ++ if (src >= dst) ++ return 0; ++ + int8_t delta = (int8_t)*src++; + uint8_t predbyte, byte; + int prederror; +-- +2.43.0 + diff --git a/libarchive.spec b/libarchive.spec index 0efa0359396c4238c03af9108569f9862bc7e607..cc3961932cfdf3ae4829b12d2fe171b0f4678d34 100644 --- a/libarchive.spec +++ b/libarchive.spec @@ -2,7 +2,7 @@ Name: libarchive Version: 3.7.1 -Release: 4 +Release: 5 Summary: Multi-format archive and compression library License: BSD URL: https://www.libarchive.org/ @@ -11,6 +11,7 @@ Source0: https://libarchive.org/downloads/%{name}-%{version}.tar.gz Patch6000: backport-CVE-2024-20697-CVE-2024-26256.patch Patch6001: backport-CVE-2024-20696.patch Patch6002: backport-CVE-2024-26256-CVE-2024-43495.patch +Patch6003: backport-fix-CVE-2024-48957.patch BuildRequires: gcc bison sharutils zlib-devel bzip2-devel xz-devel BuildRequires: lzo-devel e2fsprogs-devel libacl-devel libattr-devel @@ -202,6 +203,12 @@ run_testsuite %{_mandir}/*/bsdunzip* %changelog +* Thu Oct 10 2024 changtao - 3.7.1-5 +- Type:CVE +- ID:CVE-2024-48957 +- SUG:NA +- DESC:fix CVE-2024-48957 + * Thu Sep 19 2024 lingsheng - 3.7.1-4 - Type:CVE - ID:CVE-2024-26256,CVE-2024-43495