zlib: compressBound() returns an incorrect result on z15
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
Undecided
|
Skipper Bug Screeners | ||
bedtools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Invalid
|
Undecided
|
Unassigned | ||
Impish |
Won't Fix
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Brian Murray | ||
htslib (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Brian Murray | ||
Impish |
Won't Fix
|
Undecided
|
Unassigned | ||
Jammy |
Invalid
|
Undecided
|
Unassigned | ||
zlib (Ubuntu) |
Fix Released
|
High
|
Brian Murray | ||
Focal |
Fix Released
|
Undecided
|
Brian Murray | ||
Impish |
Won't Fix
|
High
|
Unassigned | ||
Jammy |
Fix Released
|
High
|
Brian Murray |
Bug Description
SRU Justification:
==================
[Impact]
* zlib: compressBound() returns an incorrect result on IBM z15 hardware.
* Passing the result of compressBound() to compress() results
in an error code.
* This is because compressBound() is not adjusted for DFLTCC.
[Fix]
* Adjust compressBound() for DFLTCC like it's already done
for deflateBound().
* Since zlib project does not accept patches at the moment,
the fix has been integrated into the DFLTCC pull request:
https:/
The commitid is b25781e735363e0
* The fix extracted out of the above is:
https:/
* On top of this actual zlib fix, there is another patch needed:
'Remove compressBound assertions. (PR #1258)' for htslib.
* But there is a standalone 'htslib' package version, as well as a
htslib version included in (some) 'bedtools' packages.
Both need to be patched (see '[Other]' for more details).
[Test Plan]
* An IBM z15 system (LPAR, z/VM guest or KVM virtual machine)
with Ubuntu Server 21.10 (or 22.04).
* A test can be done based on the following C test program:
#include <assert.h>
#include <stdlib.h>
#include <zlib.h>
int main() {
Bytef in_buf[128], out_buf[1024];
for (size_t i = 0; i < sizeof(in_buf); i++)
uLongf dest_len = compressBound(
int ret = compress(out_buf, &dest_len,
}
* The test needs to be done by IBM, due to the requirements
for the special z15 hardware.
* A successful test was just completed, based on the version in jammy-proposed, which is at the same code level that the impish version this SRU is targeted for.
[Where problems could occur]
* If the adjustment of compressBound() for DFLTCC is done
erroneously the issue can still be present or in worst case
even affect Z systems other than z15 only.
* The compression can become errorneous with the new changes,
e.g. in compressBound.
* Mistakes in dfltcc_free_window OF and especially DEFLATE_
(incl. the bit definitions), may cause various and unforseen defects.
* Any build time issues that might have been introduced by this patch
can be identified by a test build; this was done and is available here:
https:/
[Other Info]
* Ubuntu jammy, impish and focal are affected by the zlib issue.
* The 'htslib' version '1.13+ds' (as it is part of I, J and K),
already includes the patch,
hence only htslib '1.10.2' in focal needs to be patched.
* The bedtools version '2.30.0+dfsg' (as it is part of I, J and K),
requires the patch,
but version '2.27.1+dfsg' bedtools in focal does not incl. an
embedded htslib, hence does not need to be (actually can't be)
patched.
* Patched version of the affected htslib and bedtools packages
are build and also available at this PPA:
https:/
__________
Description: zlib: compressBound() returns an incorrect result on z15
Symptom: Passing the result of compressBound() to compress()
Problem: compressBound() is not adjusted for DFLTCC.
Solution: Adjust compressBound() for DFLTCC like it's already done
for deflateBound(). Since zlib project does not accept
the DFLTCC pull request:
https:/
The commitid is b25781e735363e0
Reproduction: z15 only:
int main() {
}
tags: | added: architecture-s39064 bugnameltc-194923 severity-high targetmilestone-inin2110 |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
affects: | linux (Ubuntu) → zlib (Ubuntu) |
Changed in ubuntu-z-systems: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
tags: | added: fr-2079 |
Changed in zlib (Ubuntu Impish): | |
importance: | Undecided → High |
Changed in zlib (Ubuntu Jammy): | |
importance: | Undecided → High |
description: | updated |
description: | updated |
Changed in zlib (Ubuntu Jammy): | |
status: | In Progress → Incomplete |
Changed in ubuntu-z-systems: | |
status: | New → Incomplete |
tags: |
added: targetmilestone-inin20045 removed: targetmilestone-inin2110 |
tags: | added: foundations-todo |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
tags: |
added: verification-done verification-done-focal removed: verification-needed verification-needed-focal |
tags: |
added: verification-needed verification-needed-focal removed: verification-done verification-done-focal |
tags: | removed: foundations-todo |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
debdiff for zlib_1. 2.11.dfsg- 2ubuntu7 to zlib_1. 2.11.dfsg- 2ubuntu8 11.dfsg- 2ubuntu8) impish; urgency=medium
(except the of the top line of the changelog:
zlib (1:1.2.
the debdiff is the same for impish and jammy)
* d/p/410- lp1961427. patch ported from zlib #410, fixing
compressBound() with hw acceleration. LP: #1961427
Refreshed some quilt patches just to remove offsets.
Thanks to Ilya Leoshkevich <email address hidden>.