public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bzip2] main: Fix off by one erro in bzip2recover
@ 2026-11-12 11:15 Jakub Martisko
0 siblings, 0 replies; only message in thread
From: Jakub Martisko @ 2026-11-12 11:15 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/bzip2
Branch : main
Commit : 0ec3df35b70e8b3ee7d32dcd671f11b2fdea3a49
Author : Jakub Martisko <jamartis@redhat.com>
Date : 2026-11-12T11:29:53+01:00
Stats : +41/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/bzip2/c/0ec3df35b70e8b3ee7d32dcd671f11b2fdea3a49?branch=main
Log:
Fix off by one erro in bzip2recover
Resolves: CVE-2026-42250
---
diff --git a/bzip2-CVE-2026-42250.patch b/bzip2-CVE-2026-42250.patch
new file mode 100644
index 0000000..47554e8
--- /dev/null
+++ b/bzip2-CVE-2026-42250.patch
@@ -0,0 +1,34 @@
+From 35d122a3df8b0cc4082a4d89fdc6ee99f375fe67 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Thu, 28 May 2026 16:15:45 +0200
+Subject: bzip2recover: Make sure to not process more than
+ BZ_MAX_HANDLED_BLOCKS
+
+There is an off-by-one in the check before calling tooManyBlocks. This
+causes the scanning loop to run one more time and cause a possible
+read or write one past the global bStart, bEnd, rbStart and rbEnd
+buffers. There are no known exploits of this issue and you will need
+to compile with something like gcc -fsanitize=address (ASAN
+AddressSanitizer) to observe the faulty read/write.
+
+This has been assigned CVE-2026-42250.
+---
+ bzip2recover.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bzip2recover.c b/bzip2recover.c
+index a8131e0..4b1c219 100644
+--- a/bzip2recover.c
++++ b/bzip2recover.c
+@@ -402,7 +402,7 @@ Int32 main ( Int32 argc, Char** argv )
+ rbEnd[rbCtr] = bEnd[currBlock];
+ rbCtr++;
+ }
+- if (currBlock >= BZ_MAX_HANDLED_BLOCKS)
++ if (currBlock >= BZ_MAX_HANDLED_BLOCKS - 1)
+ tooManyBlocks(BZ_MAX_HANDLED_BLOCKS);
+ currBlock++;
+
+--
+cgit
+
diff --git a/bzip2.spec b/bzip2.spec
index 0599e03..5161e74 100644
--- a/bzip2.spec
+++ b/bzip2.spec
@@ -3,7 +3,7 @@
Summary: File compression utility
Name: bzip2
Version: 1.0.8
-Release: 24%{?dist}
+Release: 25%{?dist}
License: BSD-4-Clause
URL: https://sourceware.org/bzip2
#Source0: http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz
@@ -19,6 +19,7 @@ Patch0: bzip2-saneso.patch
Patch1: bzip2-cflags.patch
Patch2: bzip2-ldflags.patch
Patch3: man_gzipdiff.patch
+Patch4: bzip2-CVE-2026-42250.patch
BuildRequires: gcc
BuildRequires: make
@@ -62,6 +63,7 @@ Static libraries for applications using the bzip2 compression format.
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p2
+%patch -P4 -p1
cp -a %{SOURCE1} .
sed -i "s|^libdir=|libdir=%{_libdir}|" bzip2.pc
@@ -128,6 +130,10 @@ ln -s bzgrep.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzfgrep.1
%{_libdir}/pkgconfig/bzip2.pc
%changelog
+* Thu Nov 12 2026 Jakub Martisko <jamartis@redhat.com> - 1.0.8-25
+- Fix off by one error in bzip2recover
+Resolves: CVE-2026-42250
+
* Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.8-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-12 11:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 11:15 [rpms/bzip2] main: Fix off by one erro in bzip2recover Jakub Martisko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox