Bug 1466736 (CVE-2017-9226)
| Summary: | CVE-2017-9226 oniguruma: Heap buffer overflow in next_state_val() during regular expression compilation | ||
|---|---|---|---|
| Product: | [Other] Security Response | Reporter: | Adam Mariš <amaris> |
| Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
| Status: | CLOSED ERRATA | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | unspecified | CC: | alegrand, anpicker, bkearney, bmontgom, cbillett, ccoleman, cpelland, dajohnso, dedgar, dmcphers, eparis, erooth, fedora, gblomqui, gmccullo, gtanzill, hhorak, hhudgeon, jburrell, jfrey, jgoulding, jhardy, jokerman, jorton, jprause, kakkoyun, ktdreyer, lcosic, mloibl, mtasaka, no1youknowz, nstielau, obarenbo, pkrupa, psampaio, rbeyel, rcollet, roliveri, ruby-maint, simaishi, sponnaga, s, strzibny, surbania, tomckay, vanmeeuwen+fedora, vondruch, webstack-team, yozone |
| Target Milestone: | --- | Keywords: | Security |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | oniguruma 6.3.0, php 5.6.31, php 7.0.21, php 7.1.7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-06-08 03:15:50 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: | 1466749, 1466750, 1466751, 1466752, 1466753, 1554537, 1788387, 1788388, 1788389 | ||
| Bug Blocks: | 1466748, 1491035 | ||
|
Description
Adam Mariš
2017-06-30 11:02:11 UTC
Created oniguruma tracking bugs for this issue: Affects: epel-7 [bug 1466750] Affects: fedora-all [bug 1466752] Created php tracking bugs for this issue: Affects: fedora-all [bug 1466751] Created ruby tracking bugs for this issue: Affects: fedora-all [bug 1466749] Created ruby193-ruby tracking bugs for this issue: Affects: openshift-1 [bug 1466753] Further upstream patch: https://github.com/kkos/oniguruma/commit/b4bf968 Exploiting this requires attacker control of the regular expression to be compiled. By inserting invalid octal sequences, the attacker can cause the application to read or write a single word up to 256 bytes away from the intended target. The writes seem to all pass through BIT_SET(), limiting the outcome of any exploit that manages to cause a write. Ruby is not vulnerable according to upstream:
~~~
> CVE-2017-9226 https://github.com/kkos/oniguruma/issues/55
not affected.
% ruby <<'END'
str = '[\\6000'.force_encoding('KOI8-R')
Regexp.new(str).match('a')
END
Traceback (most recent call last):
2: from -:2:in `<main>'
1: from -:2:in `new'
-:2:in `initialize': invalid escape code: /[\6000/ (RegexpError)
~~~
This issue has been addressed in the following products: Red Hat Software Collections for Red Hat Enterprise Linux 6 Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS Red Hat Software Collections for Red Hat Enterprise Linux 7 Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS Via RHSA-2018:1296 https://access.redhat.com/errata/RHSA-2018:1296 The above regular expression can cause a segfault or an ASAN heap buffer overflow with version 5.9.2 of oniguruma which is included in the following containers: - openshift4/ose-metering-hadoop - openshift4/ose-metering-hive - openshift4/ose-metering-presto The above containers include oniguruma but do not use it. This includes faq and jq which are present in the above containers (depend on oniguruma) and are only used for initial setup/installation of the Operator. |