Bug 1140205 (CVE-2018-20846) - VUL-0: CVE-2018-20846: openjpeg,openjpeg2: Out-of-bounds accesses in pi_next_lrcp, pi_next_rlcp, pi_next_rpcl, pi_next_pcrl, pi_next_rpcl, and pi_next_cprl in openmj2/pi.c
Summary: VUL-0: CVE-2018-20846: openjpeg,openjpeg2: Out-of-bounds accesses in pi_next_...
Status: RESOLVED FIXED
Alias: CVE-2018-20846
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/235744/
Whiteboard: CVSSv3:SUSE:CVE-2018-20846:5.5:(AV:L/...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-03 09:18 UTC by Wolfgang Frisch
Modified: 2024-05-06 13:12 UTC (History)
8 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 Wolfgang Frisch 2019-07-03 09:18:36 UTC
CVE-2018-20846

Out-of-bounds accesses in the functions pi_next_lrcp, pi_next_rlcp,
pi_next_rpcl, pi_next_pcrl, pi_next_rpcl, and pi_next_cprl in openmj2/pi.c in
OpenJPEG through 2.3.0 allow remote attackers to cause a denial of service
(application crash).

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-20846
http://people.canonical.com/~ubuntu-security/cve/2018/CVE-2018-20846.html
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20846
https://github.com/uclouvain/openjpeg/pull/1168/commits/c277159986c80142180fbe5efb256bbf3bdf3edc
Comment 1 Hans Petter Jansson 2022-03-31 01:48:45 UTC
Our openjpeg2 in SUSE:SLE-15:Update has a fix, apparently from the 2.3.0 tarball, that looks somewhat like this:

https://github.com/rouault/openjpeg/commit/80818c39f5bfbac37768fcee95b0ffeceaa77264

The one in SUSE:SLE-12-SP2:Update does not have bounds checking, but it doesn't store the length of the array in the struct, so there is nothing to validate against.

I suggest we close this as invalid or fixed.
Comment 2 Hans Petter Jansson 2022-03-31 02:07:25 UTC
I managed to adapt the patch for 2.1.0 and add/init the include_size field, so we should be good for SLE 12 too now.
Comment 4 Hans Petter Jansson 2022-04-01 21:31:35 UTC
Done, reassigning to security-team.
Comment 5 Swamp Workflow Management 2022-04-07 19:17:55 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 6 Thomas Leroy 2022-04-14 12:51:12 UTC
@Hans, is SUSE:SLE-15:Update/openjpeg affected here?
Comment 7 Hans Petter Jansson 2022-04-20 21:59:58 UTC
(In reply to Thomas Leroy from comment #6)
> @Hans, is SUSE:SLE-15:Update/openjpeg affected here?

Hmmm, looking at this again it seems like there's a chance a bad index could slip through. Like 2.1.0, openjpeg 1 doesn't track the array size at all either.

I'll revisit this when I have time and submit another update, if that's ok.
Comment 11 Swamp Workflow Management 2022-10-27 19:30:13 UTC
SUSE-SU-2022:3802-1: An update that fixes 8 vulnerabilities is now available.

Category: security (important)
Bug References: 1140205,1149789,1179594,1179821,1180042,1180043,1180044,1180046
CVE References: CVE-2018-20846,CVE-2018-21010,CVE-2020-27814,CVE-2020-27824,CVE-2020-27841,CVE-2020-27842,CVE-2020-27843,CVE-2020-27845
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    openjpeg2-2.3.0-150000.3.8.1
openSUSE Leap 15.3 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Manager Server 4.1 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Manager Retail Branch Server 4.1 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Manager Proxy 4.1 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Server for SAP 15-SP2 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Server for SAP 15-SP1 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Server for SAP 15 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Server 15-SP2-LTSS (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Server 15-SP2-BCL (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Server 15-SP1-LTSS (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Server 15-SP1-BCL (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Server 15-LTSS (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Module for Packagehub Subpackages 15-SP3 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Module for Basesystem 15-SP4 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise Module for Basesystem 15-SP3 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise High Performance Computing 15-SP2-LTSS (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise High Performance Computing 15-SP2-ESPOS (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Enterprise Storage 7 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE Enterprise Storage 6 (src):    openjpeg2-2.3.0-150000.3.8.1
SUSE CaaS Platform 4.0 (src):    openjpeg2-2.3.0-150000.3.8.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 12 Swamp Workflow Management 2022-11-18 20:30:11 UTC
SUSE-SU-2022:4082-1: An update that fixes 6 vulnerabilities is now available.

Category: security (important)
Bug References: 1140205,1149789,1179821,1180043,1180044,1180046
CVE References: CVE-2018-20846,CVE-2018-21010,CVE-2020-27824,CVE-2020-27842,CVE-2020-27843,CVE-2020-27845
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    openjpeg-1.5.2-150000.4.10.1
openSUSE Leap 15.3 (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise Server for SAP 15 (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise Server 15-SP2-BCL (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise Server 15-SP1-BCL (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise Server 15-LTSS (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise Module for Desktop Applications 15-SP4 (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise Module for Desktop Applications 15-SP3 (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise High Performance Computing 15-SP2-LTSS (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise High Performance Computing 15-SP2-ESPOS (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    openjpeg-1.5.2-150000.4.10.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    openjpeg-1.5.2-150000.4.10.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 13 Thomas Leroy 2024-05-06 13:12:27 UTC
All done, closing.