CVE-2016-2074: Buffer Overflow
Buffer overflow in lib/flow.c in ovs-vswitchd in Open vSwitch 2.2.x and 2.3.x before 2.3.3 and 2.4.x before 2.4.1 allows remote attackers to execute arbitrary code via crafted MPLS packets, as demonstrated by a long string in an ovs-appctl command.
Other sources
Multiple versions of Open vSwitch are vulnerable to remote buffer overflow attacks, in which crafted MPLS packets could overflow the buffer reserved for MPLS labels in an OVS internal data structure. The MPLS packets that trigger the vulnerability and the potential for exploitation vary depending on version:
- Open vSwitch 2.1.x and earlier are not vulnerable.
- In Open vSwitch 2.2.x and 2.3.x, the MPLS buffer overflow can be exploited for arbitrary remote code execution.
- In Open vSwitch 2.4.x, the MPLS buffer overflow does not obviously lead to a remote code execution exploit, but testing shows that it can allow a remote denial of service.
- Open vSwitch 2.5.x is not vulnerable.
Mitigation ==========
For any version of Open vSwitch, preventing MPLS packets from reaching Open vSwitch mitigates the vulnerability. We do not recommend attempting to mitigate the vulnerability this way because of the following difficulties:
- Open vSwitch obtains packets before the iptables host firewall, so iptables on the Open vSwitch host cannot ordinarily block the vulnerability.
- If Open vSwitch is configured to support tunnels, MPLS packets encapsulated within tunnels must also be prevented from reaching the host.
- If Open vSwitch runs on a hypervisor, MPLS packets from VMs can also trigger the vulnerability.
We believe that Open vSwitch 2.4 is subject to denial of service only when debug logging is enabled. By default, debug logging is not enabled. Users most commonly enable debug logging at runtime using the "ovs-appctl" utility. When this is the case, the buffer overflow will crash the ovs-vswitchd daemon once, and then when it automatically restarts debug logging will be disabled; thus, in this situation, the vulnerability can only cause a single, brief interruption in service. Debug logging can also be enabled persistently using a command-line flag; in this situation, a stream of crafted MPLS packets could cause an extended denial of service.
Acknowledgments:
Name: the Open vSwitch project Upstream: Kashyap Thimmaraju, Bhargava Shastry
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2016-2074?
CVE-2016-2074 is classified as a high severity vulnerability due to its potential to allow remote code execution on affected systems.
Which versions of Open vSwitch are affected by CVE-2016-2074?
Open vSwitch versions 2.2.x, 2.3.x before 2.3.3, and 2.4.x before 2.4.1 are affected by CVE-2016-2074.
How do I fix CVE-2016-2074?
To fix CVE-2016-2074, upgrade Open vSwitch to version 2.5.0 or later for Red Hat or to the latest versions provided by Debian.
What causes the vulnerability in CVE-2016-2074?
CVE-2016-2074 is caused by a buffer overflow in the handling of crafted MPLS packets in Open vSwitch.
Are there any workarounds for CVE-2016-2074?
There are no known effective workarounds for CVE-2016-2074; upgrading to a patched version is recommended.