Bug 1777537 (CVE-2019-19246) - CVE-2019-19246 oniguruma: Heap-based buffer overflow in str_lower_case_match in regexec.c
Summary: CVE-2019-19246 oniguruma: Heap-based buffer overflow in str_lower_case_match ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2019-19246
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1777538 1777539 1777540 1780460 1780461 1780462 1781609 1781610 1781611 1781612 1781613 1781614 1781615 1781616 1781617 1781618 1781619 1857702
Blocks: 1777541
TreeView+ depends on / blocked
 
Reported: 2019-11-27 18:35 UTC by Guilherme de Almeida Suckevicz
Modified: 2024-03-25 15:32 UTC (History)
32 users (show)

Fixed In Version: oniguruma 6.9.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-08 13:18:25 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:3662 0 None None None 2020-09-08 09:46:34 UTC
Red Hat Product Errata RHSA-2020:5275 0 None None None 2020-12-01 12:02:54 UTC

Description Guilherme de Almeida Suckevicz 2019-11-27 18:35:13 UTC
Oniguruma through 6.9.3, as used in PHP 7.3.x and other products, has a heap-based buffer over-read in str_lower_case_match in regexec.c.

Reference:
https://bugs.php.net/bug.php?id=78559

Upstream commit:
https://github.com/kkos/oniguruma/commit/d3e402928b6eb3327f8f7d59a9edfa622fec557b

Comment 1 Guilherme de Almeida Suckevicz 2019-11-27 18:35:30 UTC
Created oniguruma tracking bugs for this issue:

Affects: epel-7 [bug 1777538]
Affects: fedora-all [bug 1777540]
Affects: openstack-rdo [bug 1777539]

Comment 2 Mark Cooper 2019-12-06 05:00:21 UTC
The following containers are packaged with OpenShift 4.x and contain a vulnerable version of oniguruma (5.9.x):
 - openshift4/ose-metering-hadoop
 - openshift4/ose-metering-hive
 - openshift4/ose-metering-presto

However, these containers include oniguruma but do not use it. This includes faq and jq which may use oniguruma, and are included within the containers but likewise, are unused.

Comment 6 Stefan Cornelius 2019-12-10 10:29:46 UTC
Using the regex provided in the upstream bug report, I can't reproduce this issue until after the following commit:
https://github.com/kkos/oniguruma/commit/4d461376bd85e7994835677b2ff453a43c49cd28

I'm currently not aware of a method to trigger this in prior versions, although the additional check added to the str_lower_case_match() function as part of the upstream patch for this CVE still applies to older versions. Thus, this may very well only be a defense-in-depth patch for older versions.

Apart from that, the impact of this issue appears very limited: we read a small amount of out-of-bounds heap memory. This could potentially lead to a crash, although in the vast majority of cases, it won't even do that. Furthermore, an attacker would need to be able to provide a regex to the application using oniguruma, which is usually a bad idea in itself.

Comment 10 errata-xmlrpc 2020-09-08 09:46:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:3662 https://access.redhat.com/errata/RHSA-2020:3662

Comment 11 Product Security DevOps Team 2020-09-08 13:18:25 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-19246

Comment 12 errata-xmlrpc 2020-12-01 12:02:48 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2020:5275 https://access.redhat.com/errata/RHSA-2020:5275


Note You need to log in before you can comment on or make changes to this bug.