[Bug 2018293] Re: [UBUNTU 20.04] Crash in zlib deflateBound() function on s390x

Frank Heimes 2018293 at bugs.launchpad.net
Wed Aug 2 16:23:40 UTC 2023


Thx Ilya for the testing and the plan - I'll copy it over to the SRU
Justification in the Bug description ...

** Description changed:

  SRU Justification:
  ==================
  
  [ Impact ]
  
-  * The zlib deflateBound() function can crash on s390x,
-    if called before deflateInit().
+  * The zlib deflateBound() function can crash on s390x,
+    if called before deflateInit().
  
-  * The solution is that zlib on s390x needs to support
-    calling deflateBound() always before deflateInit().
+  * The solution is that zlib on s390x needs to support
+    calling deflateBound() always before deflateInit().
  
  [ Test Plan ]
  
-  * detailed instructions on how to reproduce/test the bug
- 
-  * these should allow someone who is not familiar with the affected
-    package to reproduce the bug and verify that the updated package fixes
-    the problem.
+  * It's suggested to do a more overall or e2e test
+    and run the zlib-ng test suite against the system zlib
+    as follows:
+    $ git clone https://github.com/zlib-ng/zlib-ng.git
+    $ cd zlib-ng
+    $ cmake -DZLIB_COMPAT=ON -DZLIBNG_ENABLE_TESTS=OFF -DBUILD_SHARED_LIBS=ON -DWITH_DFLTCC_DEFLATE=ON -DWITH_DFLTCC_INFLATE=ON .
+    $ make gtest_zlib
+    $ ldd gtest_zlib
+      libz.so.1 => /lib/s390x-linux-gnu/libz.so.1 (0x000003fff7e00000)
+    $ ./gtest_zlib
  
  [ Where problems could occur ]
  
-  * The only (single line) modification is in the if condition
-    of the define DEFLATE_BOUND_ADJUST_COMPLEN statement in
-    deflate.c.
+  * The only (single line) modification is in the if condition
+    of the define DEFLATE_BOUND_ADJUST_COMPLEN statement in
+    deflate.c.
  
-  * Things can go wrong if the condition (or logic) is wrong,
+  * Things can go wrong if the condition (or logic) is wrong,
  
-  * or if other parts of the code are coded against the old behavior
-    and are still expecting it.
+  * or if other parts of the code are coded against the old behavior
+    and are still expecting it.
  
-  * The likely outcome would be still a crash
-    or an unexpected behavior.
+  * The likely outcome would be still a crash
+    or an unexpected behavior.
  
  [ Other Info ]
-  
-  * Getting this into mantic first,
-    before the SRU down to focal is done.
+ 
+  * Getting this into mantic first,
+    before the SRU down to focal is done.
  __________
  
  Problem Description:
  zlib deflateBound() function can crash on s390x when called before deflateInit().
  
  Solution:
  zlib on s390x needs to support calling deflateBound() before deflateInit().
  
  The fix is squashed into the latest DFLTCC PR:
  https://github.com/madler/zlib/pull/410
  
  Diff:
  https://github.com/madler/zlib/compare/113203437eda67261848b14b6c80a33ff7e33d34..f6d382a91a4e7d88b9b12ce0ecdffb1783878160

** Changed in: ubuntu-z-systems
       Status: Triaged => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to zlib in Ubuntu.
https://bugs.launchpad.net/bugs/2018293

Title:
  [UBUNTU 20.04] Crash in zlib deflateBound() function on s390x

Status in Ubuntu on IBM z Systems:
  In Progress
Status in zlib package in Ubuntu:
  In Progress
Status in zlib source package in Focal:
  New
Status in zlib source package in Jammy:
  New
Status in zlib source package in Lunar:
  New
Status in zlib source package in Mantic:
  In Progress

Bug description:
  SRU Justification:
  ==================

  [ Impact ]

   * The zlib deflateBound() function can crash on s390x,
     if called before deflateInit().

   * The solution is that zlib on s390x needs to support
     calling deflateBound() always before deflateInit().

  [ Test Plan ]

   * It's suggested to do a more overall or e2e test
     and run the zlib-ng test suite against the system zlib
     as follows:
     $ git clone https://github.com/zlib-ng/zlib-ng.git
     $ cd zlib-ng
     $ cmake -DZLIB_COMPAT=ON -DZLIBNG_ENABLE_TESTS=OFF -DBUILD_SHARED_LIBS=ON -DWITH_DFLTCC_DEFLATE=ON -DWITH_DFLTCC_INFLATE=ON .
     $ make gtest_zlib
     $ ldd gtest_zlib
       libz.so.1 => /lib/s390x-linux-gnu/libz.so.1 (0x000003fff7e00000)
     $ ./gtest_zlib

  [ Where problems could occur ]

   * The only (single line) modification is in the if condition
     of the define DEFLATE_BOUND_ADJUST_COMPLEN statement in
     deflate.c.

   * Things can go wrong if the condition (or logic) is wrong,

   * or if other parts of the code are coded against the old behavior
     and are still expecting it.

   * The likely outcome would be still a crash
     or an unexpected behavior.

  [ Other Info ]

   * Getting this into mantic first,
     before the SRU down to focal is done.
  __________

  Problem Description:
  zlib deflateBound() function can crash on s390x when called before deflateInit().

  Solution:
  zlib on s390x needs to support calling deflateBound() before deflateInit().

  The fix is squashed into the latest DFLTCC PR:
  https://github.com/madler/zlib/pull/410

  Diff:
  https://github.com/madler/zlib/compare/113203437eda67261848b14b6c80a33ff7e33d34..f6d382a91a4e7d88b9b12ce0ecdffb1783878160

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/2018293/+subscriptions




More information about the foundations-bugs mailing list