Bug 30286 - Current version of zlib make some java applications fail
Summary: Current version of zlib make some java applications fail
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL: https://board.jdownloader.org/showpos...
Whiteboard: MGA8-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2022-04-13 23:40 CEST by katnatek
Modified: 2022-04-20 23:41 CEST (History)
3 users (show)

See Also:
Source RPM: zlib-1.2.12-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description katnatek 2022-04-13 23:40:44 CEST
Description of problem:

Is possible that some java applications fail to work due some changes in zlib
A example is JDownlader from http://installer.jdownloader.org/JDownloader.jar


Version-Release number of selected component (if applicable):

zlib-1.2.12-1.mga8.src.rpm
java-11-openjdk-11.0.13.0.8-2.1.mga8.src.rpm

How reproducible:

In a 64bit system with mageia 64bit (i586 strangely is not affected)

Steps to Reproduce:
1.Download the jar
2. In console java -jar JDownloader.jar
3. The application fail to install their components and you can see the next message on the console

org.jdownloader.update.UpdateManager.log 06/04/22 12:23:39 - SEVERE [ org.jdownloader.update.UpdateManager.log ] -> Exception thro
wn at org.jdownloader.update.DefaultCallbackHandler.handleException(DefaultCallbackHandler.java:243):
org.appwork.updatesys.client.InstallException: org.tukaani.xz.CorruptedInputException: XZ Index is corrupt
       at org.appwork.updatesys.client.InstallException.wrap(InstallException.java:24)
       at org.appwork.updatesys.client.UpdateClient.runPackageExtraction(UpdateClient.java:4063)
       at org.jdownloader.update.UpdateManager.runUpdateLoop(UpdateManager.java:1227)
       at org.jdownloader.update.PendingUpdate.run(PendingUpdate.java:19)
       at org.jdownloader.update.UpdateManager$23.run(UpdateManager.java:1666)
       at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.tukaani.xz.CorruptedInputException: XZ Index is corrupt
       at org.tukaani.xz.index.IndexHash.validate(Unknown Source)
       at org.tukaani.xz.SingleXZInputStream.read(Unknown Source)
       at org.tukaani.xz.XZInputStream.read(Unknown Source)
       at java.base/java.io.InputStream.read(InputStream.java:205)
       at org.appwork.updatesys.client.UpdateClient.runPackageExtraction(UpdateClient.java:4039)
       ... 4 more 

WorkArrounds: 
1.
Download precompiled java binaries from oracle (openjdk ones don't works) and use the java from oracle to run JDownloader or the afected java application

or

2. As root downgrade to lib64zlib1-1.2.11-9

urpmi --downgrade lib64zlib1-1.2.11-9.mga8
Comment 1 David Walser 2022-04-14 00:48:24 CEST
Our openjdk probably needs to be updated too.

Assignee: bugsquad => java

Comment 2 Thomas Backlund 2022-04-16 00:04:32 CEST

I've submitted a  zlib-1.2.12-1.1.mga8 to updates_testing with a potential fix
Comment 3 katnatek 2022-04-16 04:16:02 CEST
(In reply to Thomas Backlund from comment #2)
> 
> I've submitted a  zlib-1.2.12-1.1.mga8 to updates_testing with a potential
> fix

Due something needed i also have to install the devel flavour, look like solve the reported issue, some other test to do to see if no broke other thing?
Comment 4 Thomas Backlund 2022-04-16 12:38:11 CEST

Advisory:
The zlib update to 1.2.12 done as part of security update MGASA-2022-0124
introduced stricter handling of incorrect CRC inputs with bits set above
the low 32. Unfortunately this broke some applications that uses buggy
coding like that. Even if those applications (many that are not provided
by Mageia) need to be fixed, the reality is that it will take time, and
some older legacy applications will probably never be fixed.

This update restores previous behaviour of being less strict in order to
allow the applications to work as before the zlib 1.2.12 update.


SRPM:
zlib-1.2.12-1.1.mga8.src.rpm


i586:
libminizip1-1.2.12-1.1.mga8.i586.rpm
libminizip-devel-1.2.12-1.1.mga8.i586.rpm
libzlib1-1.2.12-1.1.mga8.i586.rpm
libzlib-devel-1.2.12-1.1.mga8.i586.rpm
libzlib-static-devel-1.2.12-1.1.mga8.i586.rpm


x86_64:
lib64minizip1-1.2.12-1.1.mga8.x86_64.rpm
lib64minizip-devel-1.2.12-1.1.mga8.x86_64.rpm
lib64zlib1-1.2.12-1.1.mga8.x86_64.rpm
lib64zlib-devel-1.2.12-1.1.mga8.x86_64.rpm
lib64zlib-static-devel-1.2.12-1.1.mga8.x86_64.rpm

Assignee: java => qa-bugs

Comment 5 katnatek 2022-04-16 23:35:47 CEST
(In reply to Thomas Backlund from comment #4)
Would be good give some feedback on upstream report https://github.com/madler/zlib/issues/426 , could you do it? or tell me what to "say" ?
Comment 6 Thomas Backlund 2022-04-17 00:12:03 CEST
(In reply to katnatek from comment #5)
> (In reply to Thomas Backlund from comment #4)
> Would be good give some feedback on upstream report
> https://github.com/madler/zlib/issues/426 , could you do it? or tell me what
> to "say" ?

Just point out to them that the fix from devel branch:
https://github.com/madler/zlib/commit/ec3df00224d4b396e2ac6586ab5d25f673caa4c2

is needed in master branch to fix up 1.2.12 for this issue...
Comment 7 katnatek 2022-04-17 00:32:11 CEST
(In reply to Thomas Backlund from comment #6)
Done!
Thank you
Comment 8 Thomas Andrews 2022-04-17 23:41:18 CEST
My first attempt to reproduce the situation from Comment 0 was in a VirtualBox guest. I did not see the issue there. A bit of investigation revealed that BOTH the 64-bit and 32-bit versions of libzlib1 were installed, I have no idea when this happened - possibly at installation. Using the netinstall iso to do the install, it is more than possible that I activated the 32-bit repos as well as the 64-bit ones.

Switching to real hardware that didn't have the 32-bit version installed, I reproduced the fault. It would seem that another workaround for the original situation could have been to install the 32-bit version of libzlib1.

I updated using qarepo, with no installation issues. After the update, the problem from Comment 0 disappeared. In addition, as in Bug 30204, I ran Ark and Handbrake with no issues.

I don't know what, if anything, needs to be done about the difference between the 32-bit and 64-bit versions, but that is something to be addressed in a different bug. Giving this an OK, and validating. Advisory in Comment 4.

CC: (none) => andrewsfarm, sysadmin-bugs
Whiteboard: (none) => MGA8-64-OK
Keywords: (none) => validated_update

Dave Hodgins 2022-04-17 23:51:27 CEST

Keywords: (none) => advisory
CC: (none) => davidwhodgins

Comment 9 Mageia Robot 2022-04-18 09:43:10 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2022-0052.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 10 katnatek 2022-04-19 20:51:42 CEST
(In reply to Thomas Andrews from comment #8)
Would be fun if the solution did need to be "install the version for the arch that almost everyone try to kill" ;)

Thanks for the extra information
Comment 11 katnatek 2022-04-20 19:40:49 CEST
(In reply to Thomas Andrews from comment #8)
> My first attempt to reproduce the situation from Comment 0 was in a
> VirtualBox guest. I did not see the issue there. A bit of investigation
> revealed that BOTH the 64-bit and 32-bit versions of libzlib1 were
> installed, I have no idea when this happened - possibly at installation.
> Using the netinstall iso to do the install, it is more than possible that I
> activated the 32-bit repos as well as the 64-bit ones.
> 
> Switching to real hardware that didn't have the 32-bit version installed, I
> reproduced the fault. It would seem that another workaround for the original
> situation could have been to install the 32-bit version of libzlib1.
> 
> I updated using qarepo, with no installation issues. After the update, the
> problem from Comment 0 disappeared. In addition, as in Bug 30204, I ran Ark
> and Handbrake with no issues.
> 
> I don't know what, if anything, needs to be done about the difference
> between the 32-bit and 64-bit versions, but that is something to be
> addressed in a different bug. Giving this an OK, and validating. Advisory in
> Comment 4.

I downgrade to 1.2.12 and make the test , did not works for me, may be you also have the 32bit java also?

BTW i updated again to 1.2.12.1

Thanks a lot for the quickly response
Comment 12 Thomas Andrews 2022-04-20 23:41:28 CEST
The problem didn't show up in a VM but did with real hardware. That may be all there is to it. 

While VirtualBox is very good, it isn't perfect. I have seen at least two other situations in the last few months where a package works in a Vbox VM, but doesn't work with the host on the same hardware.

Note You need to log in before you can comment on or make changes to this bug.