linux/net/openvswitch
Jiri Benc 5bfbaf509c openvswitch: fix panic with multiple vlan headers
[ Upstream commit 2ba5af42a7 ]

When there are multiple vlan headers present in a received frame, the first
one is put into vlan_tci and protocol is set to ETH_P_8021Q. Anything in the
skb beyond the VLAN TPID may be still non-linear, including the inner TCI
and ethertype. While ovs_flow_extract takes care of IP and IPv6 headers, it
does nothing with ETH_P_8021Q. Later, if OVS_ACTION_ATTR_POP_VLAN is
executed, __pop_vlan_tci pulls the next vlan header into vlan_tci.

This leads to two things:

1. Part of the resulting ethernet header is in the non-linear part of the
   skb. When eth_type_trans is called later as the result of
   OVS_ACTION_ATTR_OUTPUT, kernel BUGs in __skb_pull. Also, __pop_vlan_tci
   is in fact accessing random data when it reads past the TPID.

2. network_header points into the ethernet header instead of behind it.
   mac_len is set to a wrong value (10), too.

Reported-by: Yulong Pei <ypei@redhat.com>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-15 08:36:41 +02:00
..
Kconfig openvswitch: Add SCTP support 2013-08-26 14:03:13 -07:00
Makefile openvswitch: Restructure datapath.c and flow.c 2013-10-03 18:16:47 -07:00
actions.c openvswitch: fix panic with multiple vlan headers 2014-10-15 08:36:41 +02:00
datapath.c core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors 2014-03-27 15:29:38 -04:00
datapath.h ovs: make functions local 2014-01-06 15:54:39 -08:00
dp_notify.c genetlink: make multicast groups const, prevent abuse 2013-11-19 16:39:06 -05:00
flow.c openvswitch: fix a possible deadlock and lockdep warning 2014-03-28 16:41:53 -04:00
flow.h openvswitch: Per cpu flow stats. 2014-01-06 15:52:24 -08:00
flow_netlink.c net: ovs: use kfree_rcu instead of rcu_free_{sw_flow_mask_cb,acts_callback} 2014-01-06 15:52:30 -08:00
flow_netlink.h openvswitch: Per cpu flow stats. 2014-01-06 15:52:24 -08:00
flow_table.c openvswitch: Fix ovs_flow_free() ovs-lock assert. 2014-02-04 22:21:45 -08:00
flow_table.h openvswitch: Fix kernel panic on ovs_flow_free 2014-02-04 22:21:17 -08:00
vport-gre.c openvswitch: remove duplicated include from vport-gre.c 2013-09-23 13:36:31 -07:00
vport-internal_dev.c openvswitch: Enable all GSO features on internal port. 2013-11-01 18:17:50 -07:00
vport-internal_dev.h openvswitch: Replace Nicira Networks. 2012-05-03 18:55:23 -07:00
vport-netdev.c openvswitch: fix vport-netdev unregister 2013-10-16 14:50:22 -07:00
vport-netdev.h openvswitch: fix vport-netdev unregister 2013-10-16 14:50:22 -07:00
vport-vxlan.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch 2013-11-04 16:25:04 -05:00
vport.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch 2014-01-06 19:48:38 -05:00
vport.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch 2014-01-06 19:48:38 -05:00