linux-stable/drivers
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
..
accessibility
acpi arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
amba
android task_work: cleanup notification modes 2020-10-17 15:05:30 -06:00
ata ata: ahci: mvebu: Make SATA PHY optional for Armada 3720 2020-10-09 12:47:56 -06:00
atm
auxdisplay
base docs updates for v5.10-rc1 2020-10-16 15:02:21 -07:00
bcma bcma: use semicolons rather than commas to separate statements 2020-10-01 16:23:50 +03:00
block We have: 2020-10-21 10:34:10 -07:00
bluetooth networking changes for the 5.10 merge window 2020-10-15 18:42:13 -07:00
bus Char/Misc driver patches for 5.10-rc1 2020-10-15 10:01:51 -07:00
cdrom
char drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
clk This pull request contains zero diff to the core framework. It is a collection 2020-10-22 12:53:28 -07:00
clocksource hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
connector
counter
cpufreq powerpc updates for 5.10 2020-10-16 12:21:15 -07:00
cpuidle powerpc updates for 5.10 2020-10-16 12:21:15 -07:00
crypto s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
dax fuse update for 5.10 2020-10-19 14:28:30 -07:00
dca
devfreq
dio
dma dmaengine: owl-dma: fix kernel-doc style for enum 2020-10-08 15:18:48 +05:30
dma-buf dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
edac EFI changes for v5.10: 2020-10-12 13:26:49 -07:00
eisa
extcon
firewire
firmware Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2020-10-21 11:15:42 -07:00
fpga
fsi
gnss
gpio - New Drivers 2020-10-14 15:56:58 -07:00
gpu drm fixes for 5.10-rc1 2020-10-20 10:19:02 -07:00
greybus
hid pci-v5.10-changes 2020-10-22 12:41:00 -07:00
hsi
hv Merge branch 'akpm' (patches from Andrew) 2020-10-16 11:31:55 -07:00
hwmon Driver Core patches for 5.10-rc1 2020-10-14 16:09:32 -07:00
hwspinlock
hwtracing intel_th: pci: Add Alder Lake CPU support 2020-10-05 12:43:54 +02:00
i2c Merge branch 'i2c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2020-10-21 10:54:05 -07:00
i3c * Fix DAA for the pre-reserved address case 2020-10-17 11:01:01 -07:00
ide block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
idle
iio chrome platform changes for 5.10 2020-10-23 10:54:13 -07:00
infiniband RDMA 5.10 pull request 2020-10-17 11:18:18 -07:00
input chrome platform changes for 5.10 2020-10-23 10:54:13 -07:00
interconnect
iommu IOMMU Fix for Linux v5.10: 2020-10-20 09:35:06 -07:00
ipack
irqchip - New Drivers 2020-10-14 15:56:58 -07:00
isdn
leds leds: pwm: Remove platform_data support 2020-10-07 12:02:58 +02:00
lightnvm
macintosh powerpc updates for 5.10 2020-10-16 12:21:15 -07:00
mailbox mailbox: avoid timer start from callback 2020-10-16 19:09:17 -05:00
mcb
md - Improve DM core's bio splitting to use blk_max_size_offset(). Also 2020-10-14 15:05:38 -07:00
media dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
memory IOMMU Updates for Linux v5.10 2020-10-14 12:08:34 -07:00
memstick
message SCSI misc on 20201013 2020-10-14 15:15:35 -07:00
mfd - New Drivers 2020-10-14 15:56:58 -07:00
misc pci-v5.10-changes 2020-10-22 12:41:00 -07:00
mmc block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
most
mtd This pull request contains fixes for UBI and UBIFS 2020-10-18 09:56:50 -07:00
mux
net gtp: fix an use-before-init in gtp_newlink() 2020-10-29 09:43:21 -07:00
nfc nfc: remove unneeded break 2020-10-20 10:36:41 -07:00
ntb
nubus
nvdimm mm/memremap_pages: support multiple ranges per invocation 2020-10-13 18:38:28 -07:00
nvme drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
nvmem
of networking changes for the 5.10 merge window 2020-10-15 18:42:13 -07:00
opp Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-10-06 12:26:45 +02:00
oprofile
parisc dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00
parport
pci VFIO updates for v5.10-rc1 2020-10-22 13:00:44 -07:00
pcmcia
perf perf: arm-cmn: Fix conversion specifiers for node type 2020-10-01 22:30:07 +01:00
phy pci-v5.10-changes 2020-10-22 12:41:00 -07:00
pinctrl Pin control bulk changes for the v5.10 kernel cycle 2020-10-14 15:25:04 -07:00
platform chrome platform changes for 5.10 2020-10-23 10:54:13 -07:00
pnp PNP: remove the now unused pnp_find_card() function 2020-10-08 18:00:08 +02:00
power power supply and reset changes for the v5.10 series 2020-10-20 10:56:34 -07:00
powercap
pps
ps3
ptp
pwm chrome platform changes for 5.10 2020-10-23 10:54:13 -07:00
rapidio rapidio: fix the missed put_device() for rio_mport_add_riodev 2020-10-16 11:11:22 -07:00
ras
regulator Merge remote-tracking branch 'regulator/for-5.10' into regulator-next 2020-10-05 16:54:56 +01:00
remoteproc remoteproc updates for v5.10 2020-10-22 12:56:33 -07:00
reset
rpmsg rpmsg updates for 5.10 2020-10-22 12:58:21 -07:00
rtc RTC for 5.10 2020-10-21 11:22:08 -07:00
s390 s390/ism: fix incorrect system EID 2020-10-26 16:29:14 -07:00
sbus
scsi powerpc updates for 5.10 2020-10-16 12:21:15 -07:00
sfi
sh
siox
slimbus
soc Power management updates for 5.10-rc1 2020-10-14 10:45:41 -07:00
soundwire soundwire updates for 5.10-rc1 2020-10-01 22:59:55 +02:00
spi sound updates for 5.10 2020-10-15 11:07:44 -07:00
spmi
ssb
staging pci-v5.10-changes 2020-10-22 12:41:00 -07:00
target networking changes for the 5.10 merge window 2020-10-15 18:42:13 -07:00
tc
tee
thermal - Fix Kconfig typo "acces" -> "access" (Colin Ian King) 2020-10-17 10:40:22 -07:00
thunderbolt
tty MIPS updates for v5.10: 2020-10-16 12:40:55 -07:00
uio
usb dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
vdpa vhost,vdpa,virtio: cleanups, fixes 2020-10-23 11:00:57 -07:00
vfio VFIO updates for v5.10-rc1 2020-10-22 13:00:44 -07:00
vhost vhost_vdpa: remove unnecessary spin_lock in vhost_vring_call 2020-10-21 10:48:10 -04:00
video Merge branch 'parisc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2020-10-15 15:42:55 -07:00
virt virt: vbox: simplify the return expression of vbg_input_open() 2020-10-02 11:36:13 +02:00
virtio vhost,vdpa,virtio: cleanups, fixes 2020-10-23 11:00:57 -07:00
visorbus
vlynq
vme
w1 w1: w1_therm: make w1_poll_completion static 2020-10-05 14:49:24 +02:00
watchdog linux-watchdog 5.10-rc1 tag 2020-10-21 11:28:43 -07:00
xen xen: branch for v5.10-rc1b 2020-10-20 09:24:01 -07:00
zorro
Kconfig
Makefile