linux-stable/drivers/net
Masahiro Fujiwara 5146743120 gtp: fix an use-before-init in gtp_newlink()
*_pdp_find() from gtp_encap_recv() would trigger a crash when a peer
sends GTP packets while creating new GTP device.

RIP: 0010:gtp1_pdp_find.isra.0+0x68/0x90 [gtp]
<SNIP>
Call Trace:
 <IRQ>
 gtp_encap_recv+0xc2/0x2e0 [gtp]
 ? gtp1_pdp_find.isra.0+0x90/0x90 [gtp]
 udp_queue_rcv_one_skb+0x1fe/0x530
 udp_queue_rcv_skb+0x40/0x1b0
 udp_unicast_rcv_skb.isra.0+0x78/0x90
 __udp4_lib_rcv+0x5af/0xc70
 udp_rcv+0x1a/0x20
 ip_protocol_deliver_rcu+0xc5/0x1b0
 ip_local_deliver_finish+0x48/0x50
 ip_local_deliver+0xe5/0xf0
 ? ip_protocol_deliver_rcu+0x1b0/0x1b0

gtp_encap_enable() should be called after gtp_hastable_new() otherwise
*_pdp_find() will access the uninitialized hash table.

Fixes: 1e3a3abd8b ("gtp: make GTP sockets in gtp_newlink optional")
Signed-off-by: Masahiro Fujiwara <fujiwara.masahiro@gmail.com>
Link: https://lore.kernel.org/r/20201027114846.3924-1-fujiwara.masahiro@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-10-29 09:43:21 -07:00
..
appletalk docs updates for v5.10-rc1 2020-10-16 15:02:21 -07:00
arcnet
bonding
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-10-15 12:43:21 -07:00
dsa net: dsa: bcm_sf2: make const array static, makes object smaller 2020-10-20 20:57:57 -07:00
ethernet ibmveth: Fix use of ibmveth in a bridge. 2020-10-27 17:52:51 -07:00
fddi
fjes
hamradio drivers: net: hamradio: fix document location 2020-10-15 07:49:47 +02:00
hippi
hyperv hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
ieee802154
ipa net: ipa: command payloads already mapped 2020-10-23 18:28:52 -07:00
ipvlan
mdio net: phy: Move of_mdio from drivers/of to drivers/net/mdio 2020-10-10 10:55:05 -07:00
netdevsim devlink: Add devlink reload limit option 2020-10-09 12:06:52 -07:00
pcs net: pcs-xpcs: depend on MDIO_BUS instead of selecting it 2020-10-16 16:54:11 -07:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-10-05 18:40:01 -07:00
plip
ppp
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-10-05 18:40:01 -07:00
usb net: usb: rtl8150: don't incorrectly assign random MAC addresses 2020-10-18 12:57:30 -07:00
vmxnet3
wan net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup 2020-10-21 17:58:26 -07:00
wimax
wireguard
wireless networking changes for the 5.10 merge window 2020-10-15 18:42:13 -07:00
xen-netback xen/netback: use lateeoi irq binding 2020-10-20 10:22:03 +02:00
bareudp.c bareudp: use dev_sw_netstats_rx_add() 2020-10-06 06:23:21 -07:00
dummy.c
eql.c
geneve.c geneve: use dev_sw_netstats_rx_add() 2020-10-06 06:23:21 -07:00
gtp.c gtp: fix an use-before-init in gtp_newlink() 2020-10-29 09:43:21 -07:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c net: macsec: use new function dev_fetch_sw_netstats 2020-10-13 17:33:48 -07:00
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c bpf: Add redirect_peer helper 2020-10-11 10:21:04 -07:00
virtio_net.c Revert "virtio-net: ethtool configurable RXCSUM" 2020-10-21 20:33:19 -07:00
vrf.c
vsockmon.c
vxlan.c vxlan: use dev_sw_netstats_rx_add() 2020-10-06 06:23:21 -07:00
xen-netfront.c