[packages/zlib] Rel 4. Fix heap overflow in gzprintf after a stalled non-blocking write
arekm
arekm at pld-linux.org
Thu Oct 29 09:14:31 CET 2026
commit 82707d23acb443dcf01332f51fb006fdc8196fba
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Oct 28 23:46:49 2026 +0100
Rel 4. Fix heap overflow in gzprintf after a stalled non-blocking write
Fixes CVE-2026-85091.
CVE-2026-85091.patch | 18 ++++++++++++++++++
zlib.spec | 4 +++-
2 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/zlib.spec b/zlib.spec
index 764e4c1..52068c2 100644
--- a/zlib.spec
+++ b/zlib.spec
@@ -18,13 +18,14 @@ Summary(tr.UTF-8): Sıkıştırma işlemleri için kitaplık
Summary(uk.UTF-8): Бібліотека для компресії та декомпресії
Name: zlib
Version: 1.3.2
-Release: 3
+Release: 4
License: BSD
Group: Libraries
Source0: https://www.zlib.net/%{name}-%{version}.tar.gz
# Source0-md5: a1e6c958597af3c67d162995a342138a
Patch0: %{name}-asm.patch
Patch1: header.patch
+Patch2: CVE-2026-85091.patch
URL: https://www.zlib.net/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
@@ -295,6 +296,7 @@ Ten pakiet zawiera statyczną wersję biblioteki minizip.
%setup -q
%patch -P1 -p1
+%patch -P2 -p1
%if %{with asmopt}
%patch -P0 -p1
%ifarch i686 pentium3 pentium4 athlon
diff --git a/CVE-2026-85091.patch b/CVE-2026-85091.patch
new file mode 100644
index 0000000..34a0c70
--- /dev/null
+++ b/CVE-2026-85091.patch
@@ -0,0 +1,18 @@
+# CVE-2026-85091; https://github.com/madler/zlib/commit/df84af25dc1942490e1d1c899a07619152a46148
+diff --git a/gzwrite.c b/gzwrite.c
+index b217b85ce..512329244 100644
+--- a/gzwrite.c
++++ b/gzwrite.c
+@@ -242,8 +242,11 @@ local z_size_t gz_write(gz_statep state, voidpc buf, z_size_t len) {
+ n -= state->strm.avail_in;
+ state->x.pos += n;
+ len -= n;
+- if (ret == -1)
++ if (ret == -1) {
++ state->strm.avail_in = 0;
++ state->strm.next_in = state->in;
+ return state->again ? put - len : 0;
++ }
+ } while (len);
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/zlib.git/commitdiff/82707d23acb443dcf01332f51fb006fdc8196fba
More information about the pld-cvs-commit
mailing list