Bug 1768997 (CVE-2019-16163)

Summary: CVE-2019-16163 oniguruma: Stack exhaustion in regcomp.c because of recursion in regparse.c
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: alegrand, anpicker, bmontgom, dbecker, eparis, erooth, hhorak, jburrell, jjoyce, jkucera, jokerman, jorton, jschluet, kakkoyun, ktdreyer, lcosic, lhh, lpeer, mburns, mcooper, mloibl, mtasaka, no1youknowz, nstielau, palonsor, pkrupa, rcollet, ruby-maint, sclewis, security-response-team, slinaber, sponnaga, sttts, surbania, webstack-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-08 13:18:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1768999, 1768998, 1769000, 1772752, 1772753, 1772754, 1775402, 1775797, 1775798, 1775799, 1775800, 1775801, 1775810, 1775811, 1775812, 1780263, 1780264, 1857700    
Bug Blocks: 1769001    

Description Guilherme de Almeida Suckevicz 2019-11-05 18:08:36 UTC
Oniguruma before 6.9.3 allows Stack Exhaustion in regcomp.c because of recursion in regparse.c.

Reference:
https://github.com/kkos/oniguruma/issues/147

Upstream commit:
https://github.com/kkos/oniguruma/commit/4097828d7cc87589864fecf452f2cd46c5f37180

Comment 1 Guilherme de Almeida Suckevicz 2019-11-05 18:09:00 UTC
Created oniguruma tracking bugs for this issue:

Affects: epel-7 [bug 1768999]
Affects: fedora-all [bug 1768998]
Affects: openstack-rdo [bug 1769000]

Comment 2 Mark Cooper 2019-11-15 04:57:37 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 11 Marco Benatto 2019-11-22 21:09:29 UTC
There's an issue on Oniguruma library when compiling regular expressions to binary code. During compilation phase it tries to optimize the expression by calling the function optimize_nodes(), this function is recursive however the recursion is not controlled. An attack may leverage this issue by crafting a regular expression which trigger many recursion levels or an infinite recursion of optimize_nodes() leading to a stack overflow resulting in stack corruption and DoS.

Comment 20 errata-xmlrpc 2020-09-08 09:46:19 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 21 Product Security DevOps Team 2020-09-08 13:18:19 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-16163

Comment 22 errata-xmlrpc 2024-01-24 16:41:57 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2024:0409 https://access.redhat.com/errata/RHSA-2024:0409

Comment 23 errata-xmlrpc 2024-01-30 13:20:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Extended Update Support

Via RHSA-2024:0572 https://access.redhat.com/errata/RHSA-2024:0572

Comment 24 errata-xmlrpc 2024-02-20 12:30:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:0889 https://access.redhat.com/errata/RHSA-2024:0889