android_kernel_motorola_sm6375/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Dumazet 30b0263d03 net: tun: call napi_schedule_prep() to ensure we own a napi
commit 07d120aa33cc9d9115753d159f64d20c94458781 upstream.

A recent patch exposed another issue in napi_get_frags()
caught by syzbot [1]

Before feeding packets to GRO, and calling napi_complete()
we must first grab NAPI_STATE_SCHED.

[1]
WARNING: CPU: 0 PID: 3612 at net/core/dev.c:6076 napi_complete_done+0x45b/0x880 net/core/dev.c:6076
Modules linked in:
CPU: 0 PID: 3612 Comm: syz-executor408 Not tainted 6.1.0-rc3-syzkaller-00175-g1118b2049d77 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:napi_complete_done+0x45b/0x880 net/core/dev.c:6076
Code: c1 ea 03 0f b6 14 02 4c 89 f0 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 24 04 00 00 41 89 5d 1c e9 73 fc ff ff e8 b5 53 22 fa <0f> 0b e9 82 fe ff ff e8 a9 53 22 fa 48 8b 5c 24 08 31 ff 48 89 de
RSP: 0018:ffffc90003c4f920 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000030 RCX: 0000000000000000
RDX: ffff8880251c0000 RSI: ffffffff875a58db RDI: 0000000000000007
RBP: 0000000000000001 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffff888072d02628
R13: ffff888072d02618 R14: ffff888072d02634 R15: 0000000000000000
FS: 0000555555f13300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055c44d3892b8 CR3: 00000000172d2000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
napi_complete include/linux/netdevice.h:510 [inline]
tun_get_user+0x206d/0x3a60 drivers/net/tun.c:1980
tun_chr_write_iter+0xdb/0x200 drivers/net/tun.c:2027
call_write_iter include/linux/fs.h:2191 [inline]
do_iter_readv_writev+0x20b/0x3b0 fs/read_write.c:735
do_iter_write+0x182/0x700 fs/read_write.c:861
vfs_writev+0x1aa/0x630 fs/read_write.c:934
do_writev+0x133/0x2f0 fs/read_write.c:977
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f37021a3c19

Fixes: 1118b2049d77 ("net: tun: Fix memory leaks of napi_get_frags")
Reported-by: syzbot <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Wang Yufen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-25 17:42:11 +01:00
..
accessibility
acpi ACPI: video: Force backlight native for more TongFang devices 2022-10-29 10:20:36 +02:00
amba
android binder: fix UAF of alloc->vma in race with munmap() 2022-11-10 17:57:54 +01:00
ata ata: pata_legacy: fix pdc20230_set_piomode() 2022-11-10 17:57:50 +01:00
atm
auxdisplay
base PM: domains: Fix handling of unavailable/disabled idle states 2022-11-03 23:56:56 +09:00
bcma
block nbd: Fix hung when signal interrupts nbd_start_device_ioctl() 2022-10-26 13:22:56 +02:00
bluetooth
bus
cdrom
char random: use expired timer rather than wq for mixing fast pool 2022-10-15 07:54:40 +02:00
clk clk: bcm2835: Make peripheral PLLC critical 2022-10-26 13:22:59 +02:00
clocksource
connector
counter
cpufreq x86/devicetable: Move x86 specific macro out of generic code 2022-10-07 09:16:54 +02:00
cpuidle
crypto crypto: cavium - prevent integer overflow loading firmware 2022-10-26 13:22:46 +02:00
dax
dca
devfreq
dio
dma dmaengine: at_hdmac: Check return code of dma_async_device_register 2022-11-25 17:42:10 +01:00
dma-buf
edac
eisa
extcon
firewire
firmware efi: random: reduce seed size to 32 bytes 2022-11-10 17:57:55 +01:00
fpga
fsi fsi: core: Check error number after calling ida_simple_get 2022-10-26 13:22:41 +02:00
gnss
gpio
gpu drm/i915/dmabuf: fix sg_table handling in map_dma_buf 2022-11-25 17:42:09 +01:00
greybus
hid HID: hyperv: fix possible memory leak in mousevsc_probe() 2022-11-25 17:42:04 +01:00
hsi HSI: omap_ssi_port: Fix dma_map_sg error check 2022-10-26 13:22:36 +02:00
hv Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region 2022-09-28 11:04:08 +02:00
hwmon hwmon/coretemp: Handle large core ID value 2022-10-29 10:20:34 +02:00
hwspinlock
hwtracing
i2c i2c: xiic: Add platform module alias 2022-11-10 17:57:53 +01:00
i3c
ide
idle intel_idle: Disable IBRS during long idle 2022-10-07 09:16:55 +02:00
iio iio: light: tsl2583: Fix module unloading 2022-11-03 23:56:53 +09:00
infiniband RDMA/qedr: clean up work queue on failure in qedr_alloc_resources() 2022-11-10 17:57:50 +01:00
input Input: xpad - fix wireless 360 controller breaking after suspend 2022-10-15 07:54:41 +02:00
interconnect
iommu iommu/vt-d: Clean up si_domain in the init_dmars() error path 2022-10-29 10:20:35 +02:00
ipack
irqchip
isdn isdn: mISDN: netjet: fix wrong check of device registration 2022-11-10 17:57:51 +01:00
leds
lightnvm
macintosh
mailbox mailbox: bcm-ferxrm-mailbox: Fix error check for dma_map_sg 2022-10-26 13:22:44 +02:00
mcb
md md: Replace snprintf with scnprintf 2022-10-26 13:23:00 +02:00
media media: dvb-frontends/drxk: initialize err to 0 2022-11-10 17:57:53 +01:00
memory memory: of: Fix refcount leak bug in of_get_ddr_timings() 2022-10-26 13:22:31 +02:00
memstick
message
mfd mfd: sm501: Add check for platform_driver_register() 2022-10-26 13:22:42 +02:00
misc misc: ocxl: fix possible refcount leak in afu_ioctl() 2022-10-26 13:22:37 +02:00
mmc mmc: sdhci-tegra: Fix SDHCI_RESET_ALL for CQHCI 2022-11-25 17:42:08 +01:00
mtd mtd: rawnand: gpmi: Set WAIT_FOR_READY timeout based on program/erase times 2022-11-10 17:57:57 +01:00
mux
net net: tun: call napi_schedule_prep() to ensure we own a napi 2022-11-25 17:42:11 +01:00
nfc nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send() 2022-11-10 17:57:50 +01:00
ntb
nubus
nvdimm
nvme nvmet-tcp: add bounds check on Transfer Tag 2022-10-26 13:22:58 +02:00
nvmem
of of: mdio: Add of_node_put() when breaking out of for_each_xx 2022-09-28 11:04:06 +02:00
opp
oprofile
parisc parisc: Export iosapic_serial_irq() symbol for serial port driver 2022-11-10 17:57:56 +01:00
parport
pci PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge 2022-10-26 13:22:16 +02:00
pcmcia
perf
phy phy: stm32: fix an error code in probe 2022-11-25 17:42:03 +01:00
pinctrl
platform platform/x86: hp_wmi: Fix rfkill causing soft blocked wifi 2022-11-25 17:42:09 +01:00
pnp
power power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type() 2022-10-26 13:22:56 +02:00
powercap powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue 2022-10-26 13:22:47 +02:00
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: qcom_rpm: Fix circular deferral regression 2022-10-26 13:22:15 +02:00
remoteproc
reset
rpmsg rpmsg: qcom: glink: replace strncpy() with strscpy_pad() 2022-10-15 07:54:38 +02:00
rtc
s390 s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup 2022-09-28 11:04:08 +02:00
sbus
scsi scsi: core: Restrict legal sdev_state transitions via sysfs 2022-11-10 17:57:53 +01:00
sfi
sh
siox
slimbus
soc soc: qcom: smem_state: Add refcounting for the 'state->of_node' 2022-10-26 13:22:32 +02:00
soundwire
spi spi: s3c64xx: Fix large transfers with DMA 2022-10-26 13:22:25 +02:00
spmi spmi: pmic-arb: correct duplicate APID to PPID mapping logic 2022-10-26 13:22:43 +02:00
ssb
staging media: meson: vdec: fix possible refcount leak in vdec_probe() 2022-11-10 17:57:53 +01:00
target
tc
tee
thermal thermal: intel_powerclamp: Use first online CPU as control_cpu 2022-10-26 13:23:01 +02:00
thunderbolt
tty parisc: Make 8250_gsc driver dependend on CONFIG_PARISC 2022-11-10 17:57:56 +01:00
uio
usb xhci: Remove device endpoints from bandwidth list when freeing the device 2022-11-03 23:56:53 +09:00
vfio
vhost vhost/vsock: Use kvmalloc/kvfree for larger packets. 2022-10-26 13:22:25 +02:00
video fbdev: smscufx: Fix several use-after-free bugs 2022-11-03 23:56:53 +09:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen xen/gntdev: Prevent leaking grants 2022-11-03 23:56:54 +09:00
zorro
Kconfig
Makefile