Bug 1473735

Summary: ovs-vswitchd crashes with SIGSEGV randomly when adding/removing interfaces
Product: Red Hat OpenStack Reporter: Daniel Alvarez Sanchez <dalvarez>
Component: openvswitchAssignee: Timothy Redaelli <tredaelli>
Status: CLOSED ERRATA QA Contact: Alexander Stafeyev <astafeye>
Severity: high Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: amuller, apevec, chrisw, fleitner, gkadam, jsitnick, mburns, rhos-maint, srevivo
Target Milestone: z4Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openvswitch-2.6.1-12.git20161206.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-06 16:59:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Alvarez Sanchez 2017-07-21 14:19:01 UTC
This bug is a follow up from bug #1468334 [0].

Through the examination of the coredump submitted to it, we concluded that getifaddrs() from glibc is returning an interface with ifa_name set to NULL.
When openvswitch tries to compare it through strncmp(), it will crash trying to access a NULL location.

I have submitted a patch to OVS master [1] which checks that ifa_name is not NULL prior to calling strncmp(). 

Versions:

glibc.x86_64                    2.17-157.el7_3.1 
kernel.x86_64                   3.10.0-514.6.1.el7

Additional info:
This's been observed in an OpenStack compute node using hybrid firewall (more interfaces) and ~70 VM's (with a total of ~400 interfaces).
It looks like this bug comes from a different bug in glibc which shouldn't
return an unnamed interface. I have filled a bug [2] but until it's confirmed/fixed I think we have to protect ourselves in OVS through [1].

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1468334
Version-Release number of selected component (if applicable):
[1] https://mail.openvswitch.org/pipermail/ovs-dev/2017-July/335859.html
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=21812

Comment 13 errata-xmlrpc 2017-09-06 16:59:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2648