Bug 1396979 (CVE-2016-9397)

Summary: CVE-2016-9397 jasper: reachable assertion in jpc_dequantize()
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abhgupta, bmcclain, cfergeau, 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: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 11:47:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1396987, 1396988, 1396989, 1434464, 1910576    
Bug Blocks: 1449402    

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

CVE assignment:

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

Comment 1 Adam Mariš 2016-11-21 10:36:59 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:15 UTC
Created jasper tracking bugs for this issue:

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

Comment 3 Tomas Hoger 2016-12-05 13:10:30 UTC
Original reporter's advisory:

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

Relevant part of the advisory:

Affected version:
1.900.13

Output/failure:
type = 0xff76 (UNKNOWN); len = 20;00 40 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
imginfo: /tmp/portage/media-libs/jasper-1.900.13/work/jasper-1.900.13/src/libjasper/jpc/jpc_dec.c:1817: void jpc_dequantize(jas_matrix_t *, jpc_fix_t): Assertion `absstepsize >= 0′ failed.

Commit fix:
N/A

Fixed version:
N/A

Testcase:
https://github.com/asarubbo/poc/blob/master/00010-jasper-assert-jpc_dequantize

CVE:
CVE-2016-9397


Upstream bug report:

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

Comment 4 Tomas Hoger 2016-12-05 13:41:10 UTC
The reproducer does not work against recent jasper versions.  However, that only seems to be a side effect of a different fix causing jasper to abort image parsing earlier, rather than actually being fixed.

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