linux-stable/drivers/net
Sabrina Dubroca fcd91dd449 net: add recursion limit to GRO
Currently, GRO can do unlimited recursion through the gro_receive
handlers.  This was fixed for tunneling protocols by limiting tunnel GRO
to one level with encap_mark, but both VLAN and TEB still have this
problem.  Thus, the kernel is vulnerable to a stack overflow, if we
receive a packet composed entirely of VLAN headers.

This patch adds a recursion counter to the GRO layer to prevent stack
overflow.  When a gro_receive function hits the recursion limit, GRO is
aborted for this skb and it is processed normally.  This recursion
counter is put in the GRO CB, but could be turned into a percpu counter
if we run out of space in the CB.

Thanks to Vladimír Beneš <vbenes@redhat.com> for the initial bug report.

Fixes: CVE-2016-7039
Fixes: 9b174d88c2 ("net: Add Transparent Ethernet Bridging GRO support.")
Fixes: 66e5133f19 ("vlan: Add GRO support for non hardware accelerated vlan")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-20 14:32:22 -04:00
..
appletalk
arcnet
bonding Merge branch 'work.uaccess2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-11 23:38:39 -07:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-10-02 22:20:41 -04:00
cris
dsa net: dsa: bcm_sf2: Fix module autoload for OF registration 2016-10-17 13:03:03 -04:00
ethernet stmmac: display the descriptors if DES0 = 0 2016-10-20 11:27:25 -04:00
fddi
fjes
hamradio 6pack: fix buffer length mishandling 2016-09-20 22:51:30 -04:00
hippi
hyperv net/hyperv: avoid uninitialized variable 2016-10-18 14:20:36 -04:00
ieee802154 fakelb: fix schedule while atomic 2016-09-19 20:19:34 +02:00
ipvlan ipvlan: Introduce l3s mode 2016-09-19 01:25:22 -04:00
irda
phy net: phy: Trigger state machine on state change and not polling. 2016-10-13 12:03:47 -04:00
plip
ppp
slip
team
usb net: asix: Avoid looping when the device does not respond 2016-10-14 16:06:54 -04:00
vmxnet3 vmxnet3: avoid assumption about invalid dma_pa in vmxnet3_set_mc() 2016-10-15 17:47:32 -04:00
wan net: wan: slic_ds26522: Allow driver to built if COMPILE_TEST is enabled 2016-10-14 10:11:49 -04:00
wimax
wireless This is relatively small, mostly to get the SG/crypto 2016-10-18 10:26:15 -04:00
xen-netback xen-netback: fix type mismatch warning 2016-10-13 11:02:25 -04:00
dummy.c
eql.c
geneve.c net: add recursion limit to GRO 2016-10-20 14:32:22 -04:00
gtp.c
ifb.c
Kconfig ipvlan: Fix dependency issue 2016-09-20 22:55:23 -04:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c
veth.c
virtio_net.c
vrf.c net: Require exact match for TCP socket lookups if dif is l3mdev 2016-10-17 10:17:05 -04:00
vxlan.c net: add recursion limit to GRO 2016-10-20 14:32:22 -04:00
xen-netfront.c xen-netfront: avoid packet loss when ethernet header crosses page boundary 2016-09-20 04:40:41 -04:00