linux-uconsole/drivers/net
Mahesh Bandewar 401a3b5c02 ipvlan: add L2 check for packets arriving via virtual devices
[ Upstream commit 92ff426450 ]

Packets that don't have dest mac as the mac of the master device should
not be entertained by the IPvlan rx-handler. This is mostly true as the
packet path mostly takes care of that, except when the master device is
a virtual device. As demonstrated in the following case -

  ip netns add ns1
  ip link add ve1 type veth peer name ve2
  ip link add link ve2 name iv1 type ipvlan mode l2
  ip link set dev iv1 netns ns1
  ip link set ve1 up
  ip link set ve2 up
  ip -n ns1 link set iv1 up
  ip addr add 192.168.10.1/24 dev ve1
  ip -n ns1 addr 192.168.10.2/24 dev iv1
  ping -c2 192.168.10.2
  <Works!>
  ip neigh show dev ve1
  ip neigh show 192.168.10.2 lladdr <random> dev ve1
  ping -c2 192.168.10.2
  <Still works! Wrong!!>

This patch adds that missing check in the IPvlan rx-handler.

Reported-by: Amit Sikka <amit.sikka@ericsson.com>
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22 09:23:30 +01:00
..
appletalk net/appletalk: Fix kernel memory disclosure 2017-12-09 18:42:42 +01:00
arcnet arcnet/com20020: add LEDS_CLASS dependency 2015-11-03 11:29:56 -05:00
bonding bonding: refine bond_fold_stats() wrap detection 2018-03-22 09:23:22 +01:00
caif net: caif: check return value of alloc_netdev 2015-11-09 11:31:13 -05:00
can can: flex_can: Correct the checking for frame length in flexcan_start_xmit() 2018-03-03 10:19:44 +01:00
cris
dsa net: dsa: bcm_sf2: Ensure we re-negotiate EEE during after link change 2016-12-10 19:07:23 +01:00
ethernet fm10k: correctly check if interface is removed 2018-03-22 09:23:24 +01:00
fddi
fjes fjes: Fix wrong netdevice feature flags 2017-12-20 10:04:55 +01:00
hamradio NET: mkiss: Fix panic 2017-06-17 06:39:35 +02:00
hippi hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close 2018-02-25 11:03:42 +01:00
hyperv hv_netvsc: use skb_get_hash() instead of a homegrown implementation 2017-03-26 12:13:18 +02:00
ieee802154 fakelb: fix schedule while atomic 2017-03-15 09:57:15 +08:00
ipvlan ipvlan: add L2 check for packets arriving via virtual devices 2018-03-22 09:23:30 +01:00
irda irda: vlsi_ir: fix check for DMA mapping errors 2017-12-25 14:22:12 +01:00
phy mdio-sun4i: Fix a memory leak 2018-03-03 10:19:45 +01:00
plip
ppp ppp: prevent unregistered channels from connecting to PPP units 2018-03-11 16:19:46 +01:00
slip ppp, slip: Validate VJ compression slot parameters completely 2015-11-02 16:25:00 -05:00
team team: fix memory leaks 2017-10-08 10:14:18 +02:00
usb USB: cdc_subset: only build when one driver is enabled 2018-02-25 11:03:47 +01:00
vmxnet3 vmxnet3: repair memory leak 2018-01-31 12:06:13 +01:00
wan hdlc_ppp: carrier detect ok, don't turn off negotiation 2018-03-11 16:19:46 +01:00
wimax net: wimax/i2400m: fix NULL-deref at probe 2017-12-20 10:04:54 +01:00
wireless mac80211_hwsim: enforce PS_MANUAL_POLL to be set after PS_ENABLED 2018-03-22 09:23:29 +01:00
xen-netback xen/netback: set default upper limit of tx/rx queues to 8 2017-11-15 17:13:09 +01:00
dummy.c
eql.c
geneve.c geneve: avoid use-after-free of skb->data 2016-12-10 19:07:24 +01:00
ifb.c
Kconfig vmxnet3: prevent building with 64K pages 2018-02-25 11:03:42 +01:00
LICENSE.SRC
loopback.c net: introduce device min_header_len 2017-02-18 16:39:27 +01:00
macvlan.c macvlan: Only deliver one copy of the frame to the macvlan interface 2017-12-20 10:05:01 +01:00
macvtap.c tun/tap: sanitize TUNSETSNDBUF input 2017-11-18 11:11:05 +01:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rapidio/rionet: fix deadlock on SMP 2016-04-12 09:08:58 -07:00
sb1000.c
Space.c
sungem_phy.c
tun.c tun: allow positive return values on dev_get_valid_name() call 2017-11-18 11:11:06 +01:00
veth.c veth: set peer GSO values 2018-03-22 09:23:29 +01:00
virtio_net.c virtio_net: fix PAGE_SIZE > 64k 2017-07-05 14:37:19 +02:00
vrf.c vrf: fix bug_on triggered by rx when destroying a vrf 2017-07-21 07:44:55 +02:00
vxlan.c vxlan: vxlan dev should inherit lowerdev's gso_max_size 2018-03-22 09:23:23 +01:00
xen-netfront.c xen-netfront: enable device after manual module load 2018-03-03 10:19:45 +01:00