Bug 1263359

Summary: openjpeg: Use-after-free vulnerability in opj_j2k_write_mco
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: carnil, erik-fedora, jcapik, manisandro, oliver, phracek, rdieter, slawomir
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openjpeg2-2.1.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-28 04:49:14 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: 1263361, 1263362, 1263364    
Bug Blocks: 1263360    

Description Adam Mariš 2015-09-15 16:04:03 UTC
Use-after-free vulnerability was found in j2k.c in opj_j2k_write_mco function.

'l_current_data' is set to 'p_j2k->m_specific_param.m_encoder.m_header_tile_data',
'p_j2k->m_specific_param.m_encoder.m_header_tile_data' is later used as arg of 'realloc' and can be freed depending on the length of 'l_mco_size',
'l_current_data' is later used and can point to a freed memory zone

Upstream patch:

https://github.com/uclouvain/openjpeg/commit/940100c28ae28931722290794889cf84a92c5f6f

Comment 1 Adam Mariš 2015-09-15 16:05:56 UTC
Created openjpeg tracking bugs for this issue:

Affects: fedora-all [bug 1263361]

Comment 2 Adam Mariš 2015-09-15 16:05:58 UTC
Created mingw-openjpeg tracking bugs for this issue:

Affects: fedora-all [bug 1263362]

Comment 3 Adam Mariš 2015-09-15 16:06:00 UTC
Created openjpeg2 tracking bugs for this issue:

Affects: fedora-all [bug 1263364]

Comment 4 Adam Mariš 2015-09-16 07:59:26 UTC
CVE request:

http://seclists.org/oss-sec/2015/q3/550

Comment 5 Fedora Update System 2015-09-21 10:48:18 UTC
openjpeg2-2.1.0-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-10-01 18:50:22 UTC
openjpeg2-2.1.0-6.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-10-01 20:22:37 UTC
openjpeg2-2.1.0-6.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Huzaifa S. Sidhpurwala 2015-10-28 04:49:14 UTC
Statement:

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