diff --git a/bzip2-6.0-sast.patch b/bzip2-6.0-sast.patch new file mode 100644 index 0000000..5ffbdc7 --- /dev/null +++ b/bzip2-6.0-sast.patch @@ -0,0 +1,11 @@ +--- ./bzip2recover.c.old 2024-12-03 11:00:07.024976697 +0100 ++++ ./bzip2recover.c 2024-12-03 11:02:28.832219809 +0100 +@@ -402,7 +402,7 @@ + rbEnd[rbCtr] = bEnd[currBlock]; + rbCtr++; + } +- if (currBlock >= BZ_MAX_HANDLED_BLOCKS) ++ if (currBlock >= (BZ_MAX_HANDLED_BLOCKS-1)) + tooManyBlocks(BZ_MAX_HANDLED_BLOCKS); + currBlock++; + diff --git a/bzip2.spec b/bzip2.spec index 0eacd98..56eb689 100644 --- a/bzip2.spec +++ b/bzip2.spec @@ -3,7 +3,7 @@ Summary: File compression utility Name: bzip2 Version: 1.0.8 -Release: 23%{?dist} +Release: 24%{?dist} License: BSD-4-Clause URL: https://sourceware.org/bzip2 #Source0: http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz @@ -20,6 +20,7 @@ Patch1: bzip2-cflags.patch Patch2: bzip2-ldflags.patch Patch3: man_gzipdiff.patch Patch4: bzip2-out_of_bounds.patch +Patch5: bzip2-6.0-sast.patch BuildRequires: gcc BuildRequires: make @@ -65,6 +66,7 @@ Static libraries for applications using the bzip2 compression format. %patch 2 -p1 %patch 3 -p2 %patch 4 -p1 +%patch 5 -p1 cp -a %{SOURCE1} . sed -i "s|^libdir=|libdir=%{_libdir}|" bzip2.pc @@ -131,6 +133,10 @@ ln -s bzgrep.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzfgrep.1 %{_libdir}/pkgconfig/bzip2.pc %changelog +* Tue Dec 03 2024 Jakub Martisko - 1.0.8-24 +- Fix an off by one error in bzip2recover.c +Resolves: RHEL-36503 + * Tue Dec 03 2024 Jakub Martisko - 1.0.8-23 - Fix out of bounds write in bz_decompress Resolves: CVE-2019-12900