Bug 1180457 (CVE-2020-27823)

Summary: VUL-0: CVE-2020-27823: openjpeg,openjpeg2: heap buffer over-write in opj_tcd_dc_level_shift_encode()
Product: [Novell Products] SUSE Security Incidents Reporter: Wolfgang Frisch <wolfgang.frisch>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED FIXED QA Contact: Security Team bot <security-team>
Severity: Major    
Priority: P3 - Medium CC: atoptsoglou, carlos.lopez, jsmeix, smash_bz
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/272922/
Whiteboard: CVSSv3.1:SUSE:CVE-2020-27823:7.8:(AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Wolfgang Frisch 2020-12-30 13:51:04 UTC
CVE-2020-27823

In openjpeg v2.3.1 and prior, there's a heap buffer overflow in opj_tcd_dc_level_shift_encode() causing an out-of-bounds WRITE when crafted input is processed by the encoder and -d option is used.

References:
https://github.com/uclouvain/openjpeg/issues/1284
https://github.com/uclouvain/openjpeg/commit/b2072402b7e14d22bba6fb8cde2a1e9996e9a919
https://bugzilla.redhat.com/show_bug.cgi?id=1905762
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-27823
https://access.redhat.com/security/cve/CVE-2020-27823
Comment 1 Wolfgang Frisch 2020-12-30 13:53:12 UTC
Judging by the source code, I set the tracking as follows:

SUSE:SLE-11-SP1:Update  ghostscript-library  Not affected [1]
SUSE:SLE-12:Update      ghostscript          Not affected [2]
SUSE:SLE-12-SP2:Update  openjpeg2            Affected 
SUSE:SLE-15:Update      ghostscript          Not affected [2]
SUSE:SLE-15:Update      openjpeg             Affected [3]
SUSE:SLE-15:Update      openjpeg2            Affected

[1] does not embed openjpeg
[2] affected code does not exist
[3] affected code found in applications/codec/convert.c
Comment 2 Wolfgang Frisch 2020-12-30 14:57:57 UTC
Also affected:
openSUSE:Factory
openSUSE:Leap:15.1
openSUSE:Leap:15.2
Comment 3 Johannes Meixner 2021-01-05 11:10:45 UTC
Why is it assigned to me when Ghostscript is not affected?
Comment 5 Hans Petter Jansson 2022-04-01 21:33:56 UTC
Done, reassigning to security-team.
Comment 6 Swamp Workflow Management 2022-04-07 19:18:10 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 7 Swamp Workflow Management 2022-04-19 10:24:49 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 8 Swamp Workflow Management 2022-04-21 19:21:08 UTC
SUSE-SU-2022:1296-1: An update that fixes 6 vulnerabilities is now available.

Category: security (important)
Bug References: 1102016,1106881,1162090,1173578,1180457,1184774
CVE References: CVE-2018-14423,CVE-2018-16376,CVE-2020-15389,CVE-2020-27823,CVE-2020-8112,CVE-2021-29338
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    openjpeg-1.5.2-150000.4.5.1
openSUSE Leap 15.3 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Manager Server 4.1 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Manager Retail Branch Server 4.1 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Manager Proxy 4.1 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Server for SAP 15-SP2 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Server for SAP 15-SP1 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Server for SAP 15 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Server 15-SP2-LTSS (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Server 15-SP2-BCL (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Server 15-SP1-LTSS (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Server 15-SP1-BCL (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Server 15-LTSS (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Realtime Extension 15-SP2 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Module for Desktop Applications 15-SP4 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise Module for Desktop Applications 15-SP3 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise High Performance Computing 15-SP2-LTSS (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise High Performance Computing 15-SP2-ESPOS (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Enterprise Storage 7 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE Enterprise Storage 6 (src):    openjpeg-1.5.2-150000.4.5.1
SUSE CaaS Platform 4.0 (src):    openjpeg-1.5.2-150000.4.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 9 Carlos López 2022-06-10 12:21:24 UTC
Done, closing.