Bug 1317826 (CVE-2016-3182)

Summary: CVE-2016-3182 openjpeg: Heap corruption in opj_free function
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: anemec, carnil, dmoppert, erik-fedora, hobbes1069, jaromir.capik, manisandro, oliver, phracek, rdieter, slawomir
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-20 04:56:26 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: 1317830, 1317831, 1317832    
Bug Blocks: 1317829    

Description Adam Mariš 2016-03-15 10:17:38 UTC
Double free or heap corruption vulnerability was found in opj_free function triggered by specially crafted JPEG2000 image file was found in openjpeg 2016.03.14.

CVE request (contains reproducer):

http://seclists.org/oss-sec/2016/q1/631

Comment 1 Adam Mariš 2016-03-15 10:20:00 UTC
Created mingw-openjpeg2 tracking bugs for this issue:

Affects: fedora-all [bug 1317831]

Comment 2 Adam Mariš 2016-03-15 10:20:05 UTC
Created openjpeg2 tracking bugs for this issue:

Affects: fedora-all [bug 1317830]
Affects: epel-all [bug 1317832]

Comment 3 Andrej Nemec 2016-03-17 08:23:14 UTC
CVE assignment:

http://seclists.org/oss-sec/2016/q1/667

Comment 5 Fedora Update System 2016-07-14 14:51:36 UTC
openjpeg2-2.1.1-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2016-07-16 21:20:41 UTC
openjpeg2-2.1.1-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2016-07-18 18:26:46 UTC
mingw-openjpeg2-2.1.1-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2016-07-18 20:53:33 UTC
mingw-openjpeg2-2.1.1-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Doran Moppert 2016-09-13 08:18:05 UTC
Upstream ticket:

https://github.com/uclouvain/openjpeg/issues/725

Comment 10 Doran Moppert 2016-09-13 08:18:30 UTC
openjpeg-1 falls to the same reproducer, though in a different location.  The function color_sycc_to_rgb (not "esycc") seems to be involved - notable because the same function exists in openjpeg2 and did not get the same checks in this update.

Chromium looks to be safe here; it has altered the sycc conversion fairly aggressively.

Comment 11 Doran Moppert 2016-09-14 04:04:54 UTC
This flaw only applies to the executables shipped with openjpeg:  applications linked with openjpeg-libs or openjpeg-devel are not affected.

Comment 12 Doran Moppert 2016-09-20 03:23:21 UTC
*** Bug 1317822 has been marked as a duplicate of this bug. ***

Comment 13 Doran Moppert 2016-09-20 04:29:37 UTC
(In reply to Doran Moppert from comment #10)
> openjpeg-1 falls to the same reproducer, though in a different location. 

This was unrelated - see bug 1036495.  Openjpeg-1.x is not affected by this issue.