Bug 1076314 (CVE-2018-5727)

Summary: VUL-2: CVE-2018-5727: openjpeg2: In OpenJPEG 2.3.0, there is an integer overflow vulnerability in theopj_t1_encode_cblks function (openjp2/t1.c). Remote attackers could leveragethis vulnerability to cause a denial of service via a crafted
Product: [Novell Products] SUSE Security Incidents Reporter: Marcus Meissner <meissner>
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, mvetter, smash_bz
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/198388/
Whiteboard: CVSSv3:SUSE:CVE-2018-5727:4.3:(AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L) maint:planned:update
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: openjpeg_2-3_opj_compress_integer-overflow_opj_t1_encode_cblks.bmp

Description Marcus Meissner 2018-01-17 07:41:13 UTC
CVE-2018-5727

In OpenJPEG 2.3.0, there is an integer overflow vulnerability in the
opj_t1_encode_cblks function (openjp2/t1.c). Remote attackers could leverage
this vulnerability to cause a denial of service via a crafted bmp file.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-5727
http://www.cvedetails.com/cve/CVE-2018-5727/
https://github.com/uclouvain/openjpeg/issues/1053
Comment 1 Marcus Meissner 2018-01-17 07:49:39 UTC
Created attachment 756363 [details]
openjpeg_2-3_opj_compress_integer-overflow_opj_t1_encode_cblks.bmp

QA REPRODUCER:

opj_compress -n 1 -i openjpeg_2-3_opj_compress_integer-overflow_opj_t1_encode_cblks.bmp -o /tmp/null.j2k
Comment 2 Marcus Meissner 2018-01-17 07:50:27 UTC
the reproducer does npot show bad behaviour run as such or with valgrind
Comment 3 Marcus Meissner 2018-01-18 11:27:37 UTC
hard to say what exact code location is hit.
Comment 4 Michael Vetter 2019-03-29 10:26:39 UTC
Upstream fix (proposed 5 minutes ago :-)) https://github.com/rouault/openjpeg/commit/a1d32a596a94280178c44a55d7e7f1acd992ed5d

See PR: https://github.com/uclouvain/openjpeg/pull/1187
Comment 5 Swamp Workflow Management 2019-04-03 21:20:07 UTC
This is an autogenerated message for OBS integration:
This bug (1076314) was mentioned in
https://build.opensuse.org/request/show/691318 Factory / openjpeg2
Comment 7 Hans Petter Jansson 2022-04-01 21:32:38 UTC
Done, reassigning to security-team. SLE-12 unaffected.
Comment 8 Swamp Workflow Management 2022-04-19 10:24:00 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 9 Gabriele Sonnu 2022-09-16 09:29:51 UTC
Done.