diff --git a/backport-fix-CVE-2024-48957-CVE-2024-48958.patch b/backport-fix-CVE-2024-48957-CVE-2024-48958.patch new file mode 100644 index 0000000000000000000000000000000000000000..0f800f4b356e079d4f252a9ad2c849f1ac75f602 --- /dev/null +++ b/backport-fix-CVE-2024-48957-CVE-2024-48958.patch @@ -0,0 +1,47 @@ +From 3ad7b9b6cc37d8a197a6c55af4634560df13771f Mon Sep 17 00:00:00 2001 +From 17d9d73ee92eeb1a08b0a56659d010d8120af33a Mon Sep 17 00:00:00 2001 +From: Wei-Cheng Pan +Date: Wed, 9 Oct 2024 11:37:50 +0800 +Subject: [PATCH] fix CVE-2024-48957 CVE-2024-48958 + +--- + libarchive/archive_read_support_format_rar.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 69fe4fa..f854c9b 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -3613,7 +3613,15 @@ execute_filter_delta(struct rar_filter *filter, struct rar_virtual_machine *vm) + { + uint8_t lastbyte = 0; + for (idx = i; idx < length; idx += 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; + lastbyte = dst[idx] = lastbyte - *src++; ++ } + } + + filter->filteredblockaddress = length; +@@ -3715,6 +3723,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..cfd381aa33c3b742f180b0e1776d2beb3e2d4bd4 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-CVE-2024-48958.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,CVE-2024-48958 +- SUG:NA +- DESC:fix CVE-2024-48957 CVE-2024-48958 + * Thu Sep 19 2024 lingsheng - 3.7.1-4 - Type:CVE - ID:CVE-2024-26256,CVE-2024-43495