Bug 1267983 (CVE-2015-6581) - CVE-2015-6581 openjpeg: Double free vulnerability in opj_j2k_copy_default_tcp_and_create_tcd
Summary: CVE-2015-6581 openjpeg: Double free vulnerability in opj_j2k_copy_default_tcp...
Alias: CVE-2015-6581
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1267986 1267987 1267988 1267989
Blocks: 1267985
TreeView+ depends on / blocked
Reported: 2015-10-01 14:06 UTC by Adam Mariš
Modified: 2021-02-17 04:53 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-10-28 04:42:23 UTC

Attachments (Terms of Use)

Description Adam Mariš 2015-10-01 14:06:56 UTC
Double-free vulnerability was found in opj_j2k_copy_default_tcp_and_create_tcd function in j2k.c in OpenJPEG before r3002, as used in PDFium in Google Chrome before 45.0.2454.85, allowing remote attacker to execute arbitrary code or cause a denial of service (heap memory corruption) by triggering a memory-allocation failure.

The opj_j2k_copy_default_tcp_and_create_tcp() function memcpy's a top-level
struct and then replaces pointers to memory owned by the original struct
with new blocks of memory. Unfortunately, an early return can leave the
copy with pointers to memory it doesn't own, which causes problems when
cleaning up the partially-initialized struct.

Upstream bug:


Upstream patch:


Comment 1 Adam Mariš 2015-10-01 14:15:45 UTC
Created openjpeg tracking bugs for this issue:

Affects: fedora-all [bug 1267987]

Comment 2 Adam Mariš 2015-10-01 14:15:50 UTC
Created mingw-openjpeg tracking bugs for this issue:

Affects: fedora-all [bug 1267988]

Comment 3 Adam Mariš 2015-10-01 14:15:54 UTC
Created openjpeg2 tracking bugs for this issue:

Affects: fedora-all [bug 1267989]

Comment 4 Huzaifa S. Sidhpurwala 2015-10-28 04:42:23 UTC
Please Note:

This seems to be valid for openjpeg2 only. The code has been redesigned completely and the upstream patch only applies to the openjpeg2 code. There's no such function call in openjpeg 1.5.1. (As per bug #1267987). Since Red Hat Enterprise Linux does not ship openjpeg2, it is not affected.


Not vulnerable. This issue did not affect the versions of openjpeg as shipped
with Red Hat Enterprise Linux 6 and 7.

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