Bug 1406405 (CVE-2016-9591)

Summary: CVE-2016-9591 jasper: use-after-free / double-free in JPC encoder
Product: [Other] Security Response Reporter: Martin Prpič <mprpic>
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, dblechte, eedri, jridky, kseifried, lsurette, mgoldboi, michal.skrivanek, mike, rbalakri, rdieter, rjones, sherold, srevivo, tiwillia, ykaul, ylavi
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: jasper 2.0.12 Doc Type: If docs needed, set a value
Doc Text:
A use-after-free flaw was found in the way JasPer, before version 2.0.12, decode certain JPEG 2000 image files. A specially crafted file could cause an application using JasPer to crash.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-09 21:44:40 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: 1406406, 1406407, 1406408, 1406409, 1439171, 1439172, 1439173, 1439174    
Bug Blocks: 1314477    

Description Martin Prpič 2016-12-20 13:06:45 UTC
A use-after-free flaw was found in the way JasPer decoded certain JPEG 2000 image files. A specially crafted file could cause an application using JasPer to crash.

Upstream issue (including a reproducer);


Comment 1 Martin Prpič 2016-12-20 13:07:03 UTC

Name: Liu Bingchang (IIE)

Comment 2 Martin Prpič 2016-12-20 13:08:25 UTC
Created jasper tracking bugs for this issue:

Affects: epel-5 [bug 1406406]
Affects: fedora-all [bug 1406408]

Created mingw-jasper tracking bugs for this issue:

Affects: epel-7 [bug 1406409]
Affects: fedora-all [bug 1406407]

Comment 3 Tomas Hoger 2017-03-31 11:49:50 UTC
This is a problem in JPC encoder, so can be triggered if malicious image is converted by jasper, it does not affect use cases when jasper is only used to read / decode images.

The problem is that certain pointer variables are not set to NULL after calls to free(), and the code may attempt to free the memory again, leading to double-free or use-after-free.

This issue was fixed upstream via this commit:


The fix is included in upstream version 2.0.12.

Comment 5 errata-xmlrpc 2017-05-09 17:21:00 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6
  Red Hat Enterprise Linux 7

Via RHSA-2017:1208 https://access.redhat.com/errata/RHSA-2017:1208