Bug 1140359 (CVE-2019-12973)

Summary: VUL-1: CVE-2019-12973: openjpeg,ghostscript,ghostscript-library,openjpeg2: In OpenJPEG 2.3.1, there is excessive iteration in the opj_t1_encode_cblks function of openjp2/t1.c. Remote attackers could leverage this vulnerability to cause a de
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: Normal    
Priority: P4 - Low CC: gabriele.sonnu, hpj, smash_bz, stefan.fent, thomas.leroy
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/235749/
Whiteboard: CVSSv3:SUSE:CVE-2018-6616:4.3:(AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L) CVSSv3:SUSE:CVE-2019-12973:3.3:(AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Wolfgang Frisch 2019-07-04 09:55:12 UTC
CVE-2019-12973

In OpenJPEG 2.3.1, there is excessive iteration in the opj_t1_encode_cblks
function of openjp2/t1.c. Remote attackers could leverage this vulnerability to
cause a denial of service via a crafted bmp file. This issue is similar to
CVE-2018-6616.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-12973
http://people.canonical.com/~ubuntu-security/cve/2019/CVE-2019-12973.html
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12973
https://github.com/uclouvain/openjpeg/commit/8ee335227bbcaf1614124046aa25e53d67b11ec3
https://github.com/uclouvain/openjpeg/pull/1185/commits/cbe7384016083eac16078b359acd7a842253d503
http://www.securityfocus.com/bid/108900
Comment 2 Dr. Werner Fink 2019-09-12 06:39:29 UTC
Only ghostscript 9.xx is affected (SLES 12/15, Leap 15.X, Tumbleweed) ... and here the question rises why we do not use the openjpeg (devel) package ... maybe ghostscript uses a hacked version of openjpeg which I've to investigate.  Nevertheless on SLES it seems that there are no openjpeg packages at all.
Comment 3 Dr. Werner Fink 2019-09-12 06:42:09 UTC
Btw: openjpeg is below  a 2-clauses BSD License :)
Comment 4 Dr. Werner Fink 2019-09-12 06:46:52 UTC
Found this in spec file of current ghostscript

# --enable-openjpeg because since Ghostscript 9.05 JasPer is deprecated
#   (--without-jasper is now an unrecognized option by configure)
#   and Ghostscript now ships modified OpenJPEG sources for JPEG2000 decoding
#   (replacing JasPer - although JasPer is still included for this release)
#   Performance, reliability and memory use whilst decoding JPX streams are all improved.
#   see also http://bugs.ghostscript.com/show_bug.cgi?id=691430
Comment 5 Swamp Workflow Management 2019-09-16 13:20:06 UTC
This is an autogenerated message for OBS integration:
This bug (1140359) was mentioned in
https://build.opensuse.org/request/show/731283 Factory / ghostscript
Comment 6 Swamp Workflow Management 2019-09-16 14:10:06 UTC
This is an autogenerated message for OBS integration:
This bug (1140359) was mentioned in
https://build.opensuse.org/request/show/731293 Factory / ghostscript
Comment 9 Swamp Workflow Management 2019-09-25 13:12:25 UTC
SUSE-SU-2019:2460-1: An update that fixes 7 vulnerabilities is now available.

Category: security (important)
Bug References: 1129180,1129186,1134156,1140359,1146882,1146884
CVE References: CVE-2019-12973,CVE-2019-14811,CVE-2019-14812,CVE-2019-14813,CVE-2019-14817,CVE-2019-3835,CVE-2019-3839
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15-SP1 (src):    ghostscript-mini-9.27-3.21.1
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    ghostscript-mini-9.27-3.21.1
SUSE Linux Enterprise Module for Basesystem 15-SP1 (src):    ghostscript-9.27-3.21.1
SUSE Linux Enterprise Module for Basesystem 15 (src):    ghostscript-9.27-3.21.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 10 Swamp Workflow Management 2019-09-26 16:17:49 UTC
SUSE-SU-2019:2478-1: An update that fixes 7 vulnerabilities is now available.

Category: security (important)
Bug References: 1129180,1131863,1134156,1140359,1146882,1146884
CVE References: CVE-2019-12973,CVE-2019-14811,CVE-2019-14812,CVE-2019-14813,CVE-2019-14817,CVE-2019-3835,CVE-2019-3839
Sources used:
SUSE OpenStack Cloud Crowbar 8 (src):    ghostscript-9.27-23.28.1
SUSE OpenStack Cloud 8 (src):    ghostscript-9.27-23.28.1
SUSE OpenStack Cloud 7 (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Software Development Kit 12-SP5 (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Software Development Kit 12-SP4 (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server for SAP 12-SP3 (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server for SAP 12-SP2 (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server for SAP 12-SP1 (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server 12-SP5 (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server 12-SP4 (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server 12-SP3-LTSS (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server 12-SP3-BCL (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server 12-SP2-LTSS (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server 12-SP2-BCL (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Server 12-SP1-LTSS (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Desktop 12-SP5 (src):    ghostscript-9.27-23.28.1
SUSE Linux Enterprise Desktop 12-SP4 (src):    ghostscript-9.27-23.28.1
SUSE Enterprise Storage 5 (src):    ghostscript-9.27-23.28.1
SUSE Enterprise Storage 4 (src):    ghostscript-9.27-23.28.1
HPE Helion Openstack 8 (src):    ghostscript-9.27-23.28.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 11 Swamp Workflow Management 2019-09-30 19:15:32 UTC
openSUSE-SU-2019:2223-1: An update that fixes 7 vulnerabilities is now available.

Category: security (important)
Bug References: 1129180,1129186,1134156,1140359,1146882,1146884
CVE References: CVE-2019-12973,CVE-2019-14811,CVE-2019-14812,CVE-2019-14813,CVE-2019-14817,CVE-2019-3835,CVE-2019-3839
Sources used:
openSUSE Leap 15.1 (src):    ghostscript-9.27-lp151.3.6.1, ghostscript-mini-9.27-lp151.3.6.1
Comment 12 Swamp Workflow Management 2019-09-30 19:19:21 UTC
openSUSE-SU-2019:2222-1: An update that fixes 7 vulnerabilities is now available.

Category: security (important)
Bug References: 1129180,1129186,1134156,1140359,1146882,1146884
CVE References: CVE-2019-12973,CVE-2019-14811,CVE-2019-14812,CVE-2019-14813,CVE-2019-14817,CVE-2019-3835,CVE-2019-3839
Sources used:
openSUSE Leap 15.0 (src):    ghostscript-9.27-lp150.2.23.1, ghostscript-mini-9.27-lp150.2.23.1
Comment 13 Thomas Leroy 2022-04-14 12:52:43 UTC
@Hans, is SUSE:SLE-15:Update/openjpeg affected here?
Comment 14 Hans Petter Jansson 2022-04-20 22:27:57 UTC
(In reply to Thomas Leroy from comment #13)
> @Hans, is SUSE:SLE-15:Update/openjpeg affected here?

Well, kind of. There is similar code in applications/codec/convert.c::bmptoimage(), but it's in the RLE8 decompression, not RLE4. There's input validation missing everywhere. I could fix it, although I don't think it qualifies as the same CVE.

(Ref. release announcement in https://github.com/uclouvain/openjpeg/pull/1185 for openjpeg2)
Comment 15 Gabriele Sonnu 2022-09-16 09:15:25 UTC
Fixed.