Bug 1396980 (CVE-2016-9398)

Summary: CVE-2016-9398 jasper: reachable assertion in jpc_floorlog2()
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abhgupta, anemec, bmcclain, cfergeau, dblechte, dmcphers, eedri, erik-fedora, jialiu, jokerman, jridky, lmeyer, lsurette, mgoldboi, michal.skrivanek, mike, mmccomas, rdieter, rh-spice-bugs, rjones, slawomir, srevivo, tiwillia, ykaul
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: jasper 2.0.17 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-18 06:27:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1396987, 1396988, 1396989, 1434464, 1910577    
Bug Blocks: 1449402    

Description Adam Mariš 2016-11-21 10:21:40 UTC
An assertion failure was possible to trigger in jpc_floorlog2.

CVE assignment:

http://seclists.org/oss-sec/2016/q4/441

Comment 1 Adam Mariš 2016-11-21 10:37:31 UTC
Created mingw-jasper tracking bugs for this issue:

Affects: fedora-all [bug 1396987]
Affects: epel-7 [bug 1396989]

Comment 2 Adam Mariš 2016-11-21 10:37:52 UTC
Created jasper tracking bugs for this issue:

Affects: fedora-all [bug 1396986]
Affects: epel-5 [bug 1396988]

Comment 3 Tomas Hoger 2016-11-29 21:13:25 UTC
Original reporter's advisory:

https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure/

Upstream bug report:

https://github.com/mdadams/jasper/issues/71

Test case:

https://github.com/asarubbo/poc/blob/master/00023-jasper-assert-jpc_floorlog2

This issue has not been fixed upstream yet - the issue is reproducible with the current git master, hence still affecting upstream version 2.0.1.

Comment 5 Tomas Hoger 2016-11-30 08:50:55 UTC
Quoting relevant part of the original reporter's advisory for posterity:

Affected version:
1.900.17

Output/failure:
imginfo: /tmp/portage/media-libs/jasper-1.900.17/work/jasper-1.900.17/src/libjasper/jpc/jpc_math.c:94: int jpc_floorlog2(int): Assertion `x > 0′ failed.

Commit fix:
N/A

Fixed version:
N/A

Testcase:
https://github.com/asarubbo/poc/blob/master/00023-jasper-assert-jpc_floorlog2

CVE:
CVE-2016-9398

Comment 6 Tomas Hoger 2017-03-01 14:21:50 UTC
Remains unfixed in 2.0.11.

Comment 8 Tomas Hoger 2020-12-28 21:38:27 UTC
Upstream commit:

https://github.com/jasper-software/jasper/commit/c6f9fb6ec7fc97a5c4213f9077faf8622685d160

The issue was fixed upstream in jasper 2.0.17.

Comment 9 Tomas Hoger 2020-12-28 21:40:34 UTC
*** Bug 1488960 has been marked as a duplicate of this bug. ***

Comment 10 Product Security DevOps Team 2021-01-18 06:27:46 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2016-9398