Bug 1632525 (CVE-2018-17205)

Summary: CVE-2018-17205 openvswitch: Error during bundle commit in ofproto/ofproto.c:ofproto_rule_insert__() allows for crash
Product: [Other] Security Response Reporter: Sam Fowler <sfowler>
Component: vulnerabilityAssignee: Alan Pevec <apevec>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aconole, ahardin, apevec, atragler, bleanhar, bmcclain, ccoleman, chrisw, ctrautma, dblechte, dedgar, dfediuck, eedri, eparis, fleitner, jgoulding, jhsiao, jjoyce, jokerman, jschluet, kbasil, kfida, lhh, lpeer, markmc, mburns, mchappel, mgoldboi, michal.skrivanek, ovs-team, ralongi, rbryant, rhos-maint, rkhan, sbonazzo, sclewis, sherold, slinaber, srevivo, tdecacqu, tgraf, tredaelli, yturgema
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
An issue was discovered in Open vSwitch (OvS), 2.7.x through 2.7.6, 2.8.x through 2.8.4, and 2.9.x through 2.9.2, where the ofproto_rule_insert__() function inside ofproto/ofproto.c is affected by an assertion failure under certain circumstances. A specially crafted flow update applied using the bundling feature of Open vSwitch could potentially cause the assertion failure, potentially leading to incorrect flow information being applied, or a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-10 10:38:36 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: 1632526, 1633062, 1638564, 1638565, 1638566, 1650037, 1651419, 1651420, 1683826    
Bug Blocks: 1632524    

Description Sam Fowler 2018-09-25 01:50:05 UTC
An issue was discovered in Open vSwitch (OvS) 2.7.x through 2.7.6, affecting ofproto_rule_insert__ in ofproto/ofproto.c. During bundle commit, flows that are added in a bundle are applied to ofproto in order. If a flow cannot be added (e.g., the flow action is a go-to for a group id that does not exist), OvS tries to revert back all previous flows that were successfully applied from the same bundle. This is possible since OvS maintains list of old flows that were replaced by flows from the bundle. While reinserting old flows, OvS has an assertion failure due to a check on rule state != RULE_INITIALIZED. This would work for new flows, but for an old flow the rule state is RULE_REMOVED. The assertion failure causes an OvS crash.


Upstream Patch:

https://github.com/openvswitch/ovs/commit/0befd1f3745055c32940f5faf9559be6a14395e6

Comment 1 Sam Fowler 2018-09-25 01:50:47 UTC
Created openvswitch tracking bugs for this issue:

Affects: openstack-rdo [bug 1632526]

Comment 2 James Hebden 2018-09-26 06:50:00 UTC
Adjust scoring given need for elevated privilege in order to work with OVS flows in a way that is useful to triggering this flaw.

RHOSP14 (OVS 2.6.1):
openvswitch:
 - CVE-2018-17205 (not present in ofproto_rule_insert__, ofproto/ofproto.c,)

RHOSP13 (OVS 2.6.1)
openvswitch:
 - CVE-2018-17205 (not present in ofproto_rule_insert__, ofproto/ofproto.c,)
 - Commonly uses FDP version (2.9.0)

RHOSP12 (OVS 2.7.4)
openvswitch:
 - CVE-2018-17205 (not present in ofproto_rule_insert__, ofproto/ofproto.c,)
 - Commonly uses FDP version (2.9.0)

RHOSP10 (OVS 2.6.1)
openvswitch:
 - CVE-2018-17205 (not present in ofproto_rule_insert__, ofproto/ofproto.c,)
 - Commonly uses FDP version (2.9.0)

RHOSP9 (OVS not packaged?)
openvswitch:
 - Repo contains 2.5.0 (Installable after running rhos-release 9, seems to inherit from RHOS7 tag)
 - CVE-2018-17205 (vulnerable code not present, code asserts rule removed, avoiding problematic behaviour)

RHOSP8 (OVS not packaged?)
openvswitch:
 - Repo contains 2.5.0 (Installable after running rhos-release 8, seems to inherit from RHOS7 tag)
 - CVE-2018-17205 (vulnerable code not present, code asserts rule removed, avoiding problematic behaviour)

RHOSP7 ELS (Important only, 2.5.0)
 - CVE-2018-17205 (vulnerable code not present, code asserts rule removed, avoiding problematic behaviour)

Fast Data Path RHEL-7 (2.9.0)
openvswitch:
 - CVE-2018-17205 (vulnerable code present in ofproto_rule_insert__, ofproto/ofproto.c, offset)
openvswitch2.10:
 - CVE-2018-17205 (has been fixed, not vulnerable)

Comment 11 errata-xmlrpc 2018-11-05 14:55:56 UTC
This issue has been addressed in the following products:

  Fast Datapath for RHEL 7

Via RHSA-2018:3500 https://access.redhat.com/errata/RHSA-2018:3500

Comment 15 Timothy Walsh 2018-11-22 05:32:52 UTC
OpenShift 3.1 to 3.4 included an openvswitch rpm.

The node container image (https://access.redhat.com/containers/#/registry.access.redhat.com/openshift3/node) includes the patch for this flaw and as per OpenShift Container Platform Tested Integrations (https://access.redhat.com/articles/2176281) customers are advised to use the updated node container.

Comment 17 errata-xmlrpc 2019-01-16 17:11:23 UTC
This issue has been addressed in the following products:

  Red Hat OpenStack Platform 10.0 (Newton)

Via RHSA-2019:0053 https://access.redhat.com/errata/RHSA-2019:0053

Comment 18 errata-xmlrpc 2019-01-16 17:52:45 UTC
This issue has been addressed in the following products:

  Red Hat OpenStack Platform 13.0 (Queens)

Via RHSA-2019:0081 https://access.redhat.com/errata/RHSA-2019:0081