Bug 1651586

Summary: netpbm should use system jasper and jbigkit
Product: Red Hat Enterprise Linux 8 Reporter: Miroslav Hradílek <mhradile>
Component: netpbmAssignee: Josef Ridky <jridky>
Status: CLOSED CURRENTRELEASE QA Contact: David Jež <djez>
Severity: high Docs Contact:
Priority: high    
Version: 8.0CC: huzaifas, ovasik, thoger
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: netpbm-10.82.00-5.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1651965 (view as bug list) Environment:
Last Closed: 2019-05-23 11:55:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Hradílek 2018-11-20 11:54:02 UTC
Description of problem:
Previously netpbm-progs used linked jasper library from the system which is watched for security. Current rhel-8 version uses built in implementation containing security flaws.

This was fortunately revealed by failing
/CoreOS/netpbm/Security/CVE-2011-4516-CVE-2011-4517-jasper-heap-buffer-overflow-flaws

Version-Release number of selected component (if applicable):
netpbm-10.82.00-4.el8.x86_64
netpbm-progs-10.82.00-4.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. ldd /usr/bin/jpeg2ktopam
^ This might affect other inaries from the package.

Actual results:
	linux-vdso.so.1 (0x00007fff669cc000)
	libnetpbm.so.11 => /lib64/libnetpbm.so.11 (0x00007f9bf18d3000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f9bf1551000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f9bf118d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f9bf1d52000)


Expected results:
use shared libjasper.so

Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=747726#c33

Comment 3 Tomas Hoger 2018-11-20 12:38:29 UTC
AFAICS, we regressed from using system to bundled jasper via the following change in Fedora:

https://src.fedoraproject.org/cgit/rpms/netpbm.git/commit/?id=9ec28379f3b97ef8b8c3922919dcd29d70c93e7a

That's a rebase of netpbm to version 10.75.99.  There's no mention in the commit to explain why we stopped using system jasper.

However, I see that we rebased netpbm to version 10.79.00 (i.e. newer than the one in the above Fedora commit) in Red Hat Enterprise Linux 7.5, while still keeping the use of system jasper.  That makes me assume there's either no hard requirement to use bundled jasper 10.75.99 and later, or that if there was a reason, it disappeared until 10.79.00.  Fedora has also been using jasper 1.900.1 until late 2016, so newer system jasper can not be a reason for the above change done in mid-2016.

Comment 5 Tomas Hoger 2018-11-20 12:50:56 UTC
There's another bundled library - jbigkit - as hinted by this bug report and declared in the bundled provides:

https://bugzilla.redhat.com/show_bug.cgi?id=1395716
https://src.fedoraproject.org/cgit/rpms/netpbm.git/commit/?id=c6abdb6bcd1709b0e5b26bf99af8d4977604bf40

The bug 1395716 comment 1 indicates we asked upstream about those bundled libs, but there's no further information if we got any response or what that response was.

AFAICS, netpbm bundles current jbigkit 2.1 (JBG_VERSION in the bundled jbig.h says so), which matches the system jbigkit version.  We should look into unbundling this library as well.

Comment 6 Huzaifa S. Sidhpurwala 2018-11-21 03:56:40 UTC
*** Bug 1651851 has been marked as a duplicate of this bug. ***

Comment 7 Josef Ridky 2018-11-26 08:58:00 UTC
Solution prepared. Need release + flag. Who can provide it?