From 1e2f66900e4f54fb9c8b5381567e7ae21287b5e1 Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Thu, 13 Oct 2022 12:41:53 +0000 Subject: [PATCH] Fix for IBM Z strm.adler Source: https://gitlab.com/redhat/centos-stream/rpms/zlib/-/merge_requests/17?commit_id=3c80b5dd5c630c46c4877a8faa59146c724c70f0 Resolves: #2135745 --- ...1-IBM-Z-hw-accelrated-deflate-strm-adler-fix.patch | 11 +++++++++++ zlib.spec | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 zlib-1.2.11-IBM-Z-hw-accelrated-deflate-strm-adler-fix.patch diff --git a/zlib-1.2.11-IBM-Z-hw-accelrated-deflate-strm-adler-fix.patch b/zlib-1.2.11-IBM-Z-hw-accelrated-deflate-strm-adler-fix.patch new file mode 100644 index 0000000..8f70f9b --- /dev/null +++ b/zlib-1.2.11-IBM-Z-hw-accelrated-deflate-strm-adler-fix.patch @@ -0,0 +1,11 @@ +--- a/contrib/s390/dfltcc.c ++++ b/contrib/s390/dfltcc.c +@@ -623,7 +623,7 @@ + state->bits = param->sbb; + state->whave = param->hl; + state->wnext = (param->ho + param->hl) & ((1 << HB_BITS) - 1); +- state->check = state->flags ? ZSWAP32(param->cv) : param->cv; ++ strm->adler = state->check = state->flags ? ZSWAP32(param->cv) : param->cv; + if (cc == DFLTCC_CC_OP2_CORRUPT && param->oesc != 0) { + /* Report an error if stream is corrupted */ + state->mode = BAD; diff --git a/zlib.spec b/zlib.spec index b6c1d84..12825b3 100644 --- a/zlib.spec +++ b/zlib.spec @@ -2,7 +2,7 @@ Name: zlib Version: 1.2.11 -Release: 34%{?dist} +Release: 35%{?dist} Summary: Compression and decompression library # /contrib/dotzlib/ have Boost license License: zlib and Boost @@ -43,6 +43,9 @@ Patch18: zlib-1.2.11-CVE-2018-25032.patch Patch19: zlib-1.2.11-cve-2022-37434.patch Patch20: zlib-1.2.11-cve-2022-37434_2.patch +# Fix setting strm.adler on z15 +Patch21: zlib-1.2.11-IBM-Z-hw-accelrated-deflate-strm-adler-fix.patch + BuildRequires: make BuildRequires: automake, autoconf, libtool @@ -115,6 +118,7 @@ developing applications which use minizip. %patch18 -p1 %patch19 -p1 %patch20 -p1 +%patch21 -p1 iconv -f iso-8859-2 -t utf-8 < ChangeLog > ChangeLog.tmp @@ -192,6 +196,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Oct 12 2022 Ilya Leoshkevich - 1.2.11-35 +- Fix for IBM strm.adler rhbz#2134074 + * Wed Aug 10 2022 Matej Mužila - 1.2.11-34 - Fix heap-based buffer over-read or buffer overflow in inflate in inflate.c - Resolves: CVE-2022-37434