1
0
Fork 0
remarkable-linux/drivers/net
Sabrina Dubroca b364a914c4 net: fix use-after-free in GRO with ESP
[ Upstream commit 603d4cf8fe ]

Since the addition of GRO for ESP, gro_receive can consume the skb and
return -EINPROGRESS. In that case, the lower layer GRO handler cannot
touch the skb anymore.

Commit 5f114163f2 ("net: Add a skb_gro_flush_final helper.") converted
some of the gro_receive handlers that can lead to ESP's gro_receive so
that they wouldn't access the skb when -EINPROGRESS is returned, but
missed other spots, mainly in tunneling protocols.

This patch finishes the conversion to using skb_gro_flush_final(), and
adds a new helper, skb_gro_flush_final_remcsum(), used in VXLAN and
GUE.

Fixes: 5f114163f2 ("net: Add a skb_gro_flush_final helper.")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-22 14:28:44 +02:00
..
appletalk License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arcnet License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bonding bonding: re-evaluate force_primary when the primary slave name changes 2018-06-26 08:06:28 +08:00
caif License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
can can: dev: increase bus-off message severity 2018-06-21 04:02:56 +09:00
cris License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dsa net: dsa: b53: Add BCM5389 support 2018-07-08 15:30:53 +02:00
ethernet ixgbe: split XDP_TX tail and XDP_REDIRECT map flushing 2018-07-22 14:28:43 +02:00
fddi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fjes
hamradio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hippi hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close 2018-02-25 11:08:04 +01:00
hyperv hv_netvsc: split sub-channel setup into async and sync 2018-07-22 14:28:43 +02:00
ieee802154 ieee802154: ca8210: fix uninitialised data read 2018-05-30 07:52:27 +02:00
ipvlan ipvlan: fix IFLA_MTU ignored on NEWLINK 2018-07-22 14:28:43 +02:00
phy net: phy: marvell: clear wol event before setting it 2018-06-21 04:02:47 +09:00
plip
ppp pppoe: check sockaddr length in pppoe_connect() 2018-04-29 11:33:12 +02:00
slip slip: Check if rstate is initialized before uncompressing 2018-04-19 08:56:16 +02:00
team team: use netdev_features_t instead of u32 2018-06-11 22:49:20 +02:00
usb net: qmi_wwan: Add Netgear Aircard 779S 2018-07-08 15:30:52 +02:00
vmxnet3 vmxnet3: use DMA memory barriers where required 2018-05-25 16:17:25 +02:00
wan hdlc_ppp: carrier detect ok, don't turn off negotiation 2018-03-08 22:41:08 -08:00
wimax License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wireless iwlwifi: pcie: compare with number of IRQs requested for, not number of CPUs 2018-07-08 15:30:52 +02:00
xen-netback xen-netfront, xen-netback: Use correct minimum MTU values 2017-10-16 16:00:44 -04:00
Kconfig x86/lguest: Remove lguest support 2017-08-24 09:57:28 +02:00
LICENSE.SRC
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Space.c
dummy.c
eql.c
geneve.c net: fix use-after-free in GRO with ESP 2018-07-22 14:28:44 +02:00
gtp.c gtp: Initialize 64-bit per-cpu stats correctly 2017-08-01 20:06:07 -07:00
ifb.c
loopback.c
macsec.c macsec: fix memory leaks when skb_to_sgvec fails 2017-10-11 14:07:20 -07:00
macvlan.c macvlan: fix use-after-free in macvlan_common_newlink() 2018-05-30 07:52:02 +02:00
macvtap.c tap: reference to KVA of an unloaded module causes kernel panic 2017-10-28 19:17:21 +09:00
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: in virtio_net_hdr only add VLAN_HLEN to csum_start if payload holds vlan 2018-06-26 08:06:28 +08:00
tun.c net: in virtio_net_hdr only add VLAN_HLEN to csum_start if payload holds vlan 2018-06-26 08:06:28 +08:00
veth.c veth: set peer GSO values 2018-03-19 08:42:54 +01:00
virtio_net.c net: in virtio_net_hdr only add VLAN_HLEN to csum_start if payload holds vlan 2018-06-26 08:06:28 +08:00
vrf.c vrf: Fix use after free and double free in vrf_finish_output 2018-04-12 12:32:24 +02:00
vsockmon.c
vxlan.c net: fix use-after-free in GRO with ESP 2018-07-22 14:28:44 +02:00
xen-netfront.c xen-netfront: Fix race between device setup and open 2018-04-26 11:02:17 +02:00