Bug 1197738 - (CVE-2022-1122) VUL-0: CVE-2022-1122: openjpeg2,openjpeg: segmentation fault in opj2_decompress due to uninitialized pointer
(CVE-2022-1122)
VUL-0: CVE-2022-1122: openjpeg2,openjpeg: segmentation fault in opj2_decompre...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/327432/
CVSSv3.1:SUSE:CVE-2022-1122:5.5:(AV:L...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-30 14:15 UTC by Thomas Leroy
Modified: 2022-09-16 09:27 UTC (History)
3 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Leroy 2022-03-30 14:15:02 UTC
rh#2067052

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

References:
https://bugzilla.redhat.com/show_bug.cgi?id=2067052
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-1122
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-1122
https://github.com/uclouvain/openjpeg/issues/1368
Comment 1 Thomas Leroy 2022-03-30 14:20:28 UTC
The following codestreams should be affected:

openjpeg
- SUSE:SLE-15:Update

openjpeg2
- SUSE:SLE-12-SP2:Update
- SUSE:SLE-15:Update
- openSUSE:Factory

Note that ghostscript and ghostscript-library don't embed this part of openjpeg
Comment 3 Hans Petter Jansson 2022-04-01 21:41:16 UTC
Still need to do something for TW. There is no new release since 2.4.0.
Comment 4 Swamp Workflow Management 2022-04-07 19:18:19 UTC
SUSE-SU-2022:1129-1: An update that fixes 13 vulnerabilities is now available.

Category: security (important)
Bug References: 1102016,1106881,1106882,1140130,1140205,1162090,1173578,1180457,1184774,1197738,971617,980504
CVE References: CVE-2016-1924,CVE-2016-3183,CVE-2016-4797,CVE-2018-14423,CVE-2018-16375,CVE-2018-16376,CVE-2018-20845,CVE-2018-20846,CVE-2020-15389,CVE-2020-27823,CVE-2020-8112,CVE-2021-29338,CVE-2022-1122
JIRA References: 
Sources used:
SUSE OpenStack Cloud Crowbar 9 (src):    openjpeg2-2.1.0-4.15.1
SUSE OpenStack Cloud Crowbar 8 (src):    openjpeg2-2.1.0-4.15.1
SUSE OpenStack Cloud 9 (src):    openjpeg2-2.1.0-4.15.1
SUSE OpenStack Cloud 8 (src):    openjpeg2-2.1.0-4.15.1
SUSE Linux Enterprise Server for SAP 12-SP4 (src):    openjpeg2-2.1.0-4.15.1
SUSE Linux Enterprise Server for SAP 12-SP3 (src):    openjpeg2-2.1.0-4.15.1
SUSE Linux Enterprise Server 12-SP5 (src):    openjpeg2-2.1.0-4.15.1
SUSE Linux Enterprise Server 12-SP4-LTSS (src):    openjpeg2-2.1.0-4.15.1
SUSE Linux Enterprise Server 12-SP3-LTSS (src):    openjpeg2-2.1.0-4.15.1
SUSE Linux Enterprise Server 12-SP3-BCL (src):    openjpeg2-2.1.0-4.15.1
SUSE Linux Enterprise Server 12-SP2-BCL (src):    openjpeg2-2.1.0-4.15.1
HPE Helion Openstack 8 (src):    openjpeg2-2.1.0-4.15.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 5 Thomas Leroy 2022-04-14 13:15:28 UTC
@Hans, is SUSE:SLE-15:Update/openjpeg affected here?
Comment 6 Swamp Workflow Management 2022-04-19 10:24:59 UTC
SUSE-SU-2022:1252-1: An update that fixes 13 vulnerabilities is now available.

Category: security (important)
Bug References: 1076314,1076967,1079845,1102016,1106881,1106882,1140130,1160782,1162090,1173578,1180457,1184774,1197738
CVE References: CVE-2018-14423,CVE-2018-16375,CVE-2018-16376,CVE-2018-20845,CVE-2018-5727,CVE-2018-5785,CVE-2018-6616,CVE-2020-15389,CVE-2020-27823,CVE-2020-6851,CVE-2020-8112,CVE-2021-29338,CVE-2022-1122
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    openjpeg2-2.3.0-150000.3.5.1
openSUSE Leap 15.3 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Manager Server 4.1 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Manager Retail Branch Server 4.1 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Manager Proxy 4.1 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Server for SAP 15-SP2 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Server for SAP 15-SP1 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Server for SAP 15 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Server 15-SP2-LTSS (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Server 15-SP2-BCL (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Server 15-SP1-LTSS (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Server 15-SP1-BCL (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Server 15-LTSS (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Realtime Extension 15-SP2 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Module for Packagehub Subpackages 15-SP3 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Module for Basesystem 15-SP4 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise Module for Basesystem 15-SP3 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise High Performance Computing 15-SP2-LTSS (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise High Performance Computing 15-SP2-ESPOS (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Enterprise Storage 7 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE Enterprise Storage 6 (src):    openjpeg2-2.3.0-150000.3.5.1
SUSE CaaS Platform 4.0 (src):    openjpeg2-2.3.0-150000.3.5.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 7 Hans Petter Jansson 2022-04-20 23:24:17 UTC
(In reply to Thomas Leroy from comment #5)
> @Hans, is SUSE:SLE-15:Update/openjpeg affected here?

No, the fix for this is in openjpeg-CVE-2021-29338.patch .
Comment 8 Gabriele Sonnu 2022-09-16 09:27:52 UTC
Done.