Bug 1406405 (CVE-2016-9591) - CVE-2016-9591 jasper: use-after-free / double-free in JPC encoder
Summary: CVE-2016-9591 jasper: use-after-free / double-free in JPC encoder
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-9591
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1406406 1406407 1406408 1406409 1439171 1439172 1439173 1439174
Blocks: 1314477
TreeView+ depends on / blocked
 
Reported: 2016-12-20 13:06 UTC by Martin Prpič
Modified: 2021-02-17 02:51 UTC (History)
19 users (show)

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.
Clone Of:
Environment:
Last Closed: 2017-05-09 21:44:40 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1208 0 normal SHIPPED_LIVE Important: jasper security update 2017-05-09 21:13:57 UTC

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);

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

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

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:

https://github.com/mdadams/jasper/commit/03fe49ab96bf65fea784cdc256507ea88267fc7c

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


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