Bug 1626088 (CVE-2018-16375)

Summary: CVE-2018-16375 openjpeg: Heap-based buffer overflow in pnmtoimage function in bin/jpwl/convert.c
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: hobbes1069, jaromir.capik, manisandro, nforro, oliver, rdieter
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-01 08:41:46 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: 1626330, 1626331, 1626332, 1626333, Engineering1626334, Engineering1626336    
Bug Blocks: Embargoed1626090    

Description Pedro Sampaio 2018-09-06 14:44:28 UTC
An issue was discovered in OpenJPEG 2.3.0. Missing checks for header_info.height and header_info.width in the function pnmtoimage in bin/jpwl/convert.c can lead to a heap-based buffer overflow.

Upstream bug:


Comment 1 Huzaifa S. Sidhpurwala 2018-09-07 04:35:42 UTC
Upstream issue: https://github.com/uclouvain/openjpeg/issues/861
Patch: https://github.com/uclouvain/openjpeg/commit/c22cbd8bdf8ff2ae372f94391a4be2d322b36b41

Heap-buffer overflow while converting image from PNM format. Specially-crafted values in the header, could cause integer overflow. This leads to a small buffer being allocated. Later when file contents are read into this buffer it leads to heap-overflow. Arbitrary code execution could be possible.

Comment 2 Huzaifa S. Sidhpurwala 2018-09-07 04:36:40 UTC
Created mingw-openjpeg2 tracking bugs for this issue:

Affects: fedora-all [bug 1626333]

Created openjpeg tracking bugs for this issue:

Affects: fedora-all [bug 1626330]

Created openjpeg2 tracking bugs for this issue:

Affects: epel-all [bug 1626331]
Affects: fedora-all [bug 1626332]

Comment 6 Product Security DevOps Team 2021-02-01 08:41:46 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):