Bug 2067052 (CVE-2022-1122)

Summary: CVE-2022-1122 openjpeg: segmentation fault in opj2_decompress due to uninitialized pointer
Product: [Other] Security Response Reporter: Rohit Keshri <rkeshri>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bdettelb, hobbes1069, jaromir.capik, manisandro, mmuzila, neuro-sig, nforro, oliver, rdieter, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the opj2_decompress program in openjpeg2 in the way it handles an input directory with a large number of files. When it fails to allocate a buffer to store the filenames of the input directory, it calls free() on an uninitialized pointer, leading to a segmentation fault and a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-07 02:16:56 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: 2069370, 2069371, 2069787, 2069788    
Bug Blocks: 2067041, 2069344    

Description Rohit Keshri 2022-03-23 06:18:57 UTC
A flaw was found in OpenJPEG v2.4.0 in opj2_decompress in the way it handles an input directory with a large number of files. When it fails to allocate a buffer to store the filenames of the input directory, it calls free() on an uninitialized pointer, leading to a segmentation fault and DoS.

Reference:
https://github.com/uclouvain/openjpeg/issues/1368

Upstream patch:
https://github.com/uclouvain/openjpeg/commit/0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d

Comment 1 Guilherme de Almeida Suckevicz 2022-03-28 19:25:26 UTC
Created mingw-openjpeg2 tracking bugs for this issue:

Affects: fedora-all [bug 2069370]


Created openjpeg2 tracking bugs for this issue:

Affects: fedora-all [bug 2069371]

Comment 4 errata-xmlrpc 2022-11-08 09:59:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:7645 https://access.redhat.com/errata/RHSA-2022:7645

Comment 5 errata-xmlrpc 2022-11-15 10:36:37 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:8207 https://access.redhat.com/errata/RHSA-2022:8207

Comment 6 Product Security DevOps Team 2022-12-07 02:16:55 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-1122