linux-stable/drivers
Lin Ma c799c18a28 hamradio: defer 6pack kfree after unregister_netdev
commit 0b9111922b upstream.

There is a possible race condition (use-after-free) like below

 (USE)                       |  (FREE)
  dev_queue_xmit             |
   __dev_queue_xmit          |
    __dev_xmit_skb           |
     sch_direct_xmit         | ...
      xmit_one               |
       netdev_start_xmit     | tty_ldisc_kill
        __netdev_start_xmit  |  6pack_close
         sp_xmit             |   kfree
          sp_encaps          |
                             |

According to the patch "defer ax25 kfree after unregister_netdev", this
patch reorder the kfree after the unregister_netdev to avoid the possible
UAF as the unregister_netdev() is well synchronized and won't return if
there is a running routine.

Signed-off-by: Lin Ma <linma@zju.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Xu Jia <xujia39@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20 09:34:03 +02:00
..
accessibility
acpi ACPI: CPPC: Avoid out of bounds access when parsing _CPC data 2022-04-08 14:24:12 +02:00
amba
android
ata ata: sata_dwc_460ex: Fix crash due to OOB write 2022-04-13 20:59:23 +02:00
atm
auxdisplay
base rtc: Check return value from mc146818_get_time() 2022-04-13 20:59:14 +02:00
bcma
block Revert "nbd: fix possible overflow on 'first_minor' in nbd_dev_add()" 2022-04-13 20:59:26 +02:00
bluetooth
bus
cdrom
char virtio_console: eliminate anonymous module_init & module_exit 2022-04-13 20:59:13 +02:00
clk clk: Enforce that disjoints limits are invalid 2022-04-13 20:59:12 +02:00
clocksource
comedi
connector
counter
cpufreq cpufreq: CPPC: Fix performance/frequency conversion 2022-04-13 20:59:11 +02:00
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma dmaengine: Revert "dmaengine: shdma: Fix runtime PM imbalance on error" 2022-04-13 20:59:26 +02:00
dma-buf
edac
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio gpio: Restrict usage of GPIO chip irq members before initialization 2022-04-13 20:59:23 +02:00
gpu drm/amd/display: Fix p-state allow debug index on dcn31 2022-04-20 09:34:03 +02:00
greybus
hid
hsi
hv Drivers: hv: vmbus: Replace smp_store_mb() with virt_store_mb() 2022-04-13 20:59:27 +02:00
hwmon
hwspinlock
hwtracing
i2c
i3c
idle
iio
infiniband RDMA/hfi1: Fix use-after-free bug for mm struct 2022-04-13 20:59:23 +02:00
input
interconnect
iommu iommu/omap: Fix regression in probe for NULL pointer dereference 2022-04-13 20:59:20 +02:00
ipack
irqchip irqchip/gic, gic-v3: Prevent GSI to SGI translations 2022-04-13 20:59:28 +02:00
isdn
leds
macintosh
mailbox mailbox: imx: fix wakeup failure from freeze mode 2022-04-08 14:24:10 +02:00
mcb
md dm: requeue IO if mapping table not yet available 2022-04-13 20:59:06 +02:00
media media: ov6650: Fix crop rectangle affected by set format 2022-04-08 14:24:15 +02:00
memory
memstick
message
mfd
misc habanalabs: fix possible memory leak in MMU DR fini 2022-04-13 20:59:12 +02:00
mmc mmc: core: Fixup support for writeback-cache for eMMC and SD 2022-04-13 20:59:21 +02:00
most
mtd ubi: fastmap: Return error code if memory allocation fails in add_aeb() 2022-04-08 14:24:15 +02:00
mux
net hamradio: defer 6pack kfree after unregister_netdev 2022-04-20 09:34:03 +02:00
nfc
ntb
nubus
nvdimm
nvme nvme: fix the read-only state for zoned namespaces with unsupposed features 2022-04-08 14:24:09 +02:00
nvmem
of
opp opp: Expose of-node's name in debugfs 2022-04-13 20:59:11 +02:00
parisc parisc: Fix CPU affinity for Lasi, WAX and Dino chips 2022-04-13 20:59:14 +02:00
parport
pci PCI: endpoint: Fix misused goto label 2022-04-13 20:59:08 +02:00
pcmcia
perf perf: qcom_l2_pmu: fix an incorrect NULL check on list iterator 2022-04-13 20:59:24 +02:00
phy phy: amlogic: meson8b-usb2: fix shared reset control use 2022-04-13 20:59:11 +02:00
pinctrl pinctrl: nuvoton: npcm7xx: Use %zu printk format for ARRAY_SIZE() 2022-04-08 14:24:11 +02:00
platform platform/chrome: cros_ec_typec: Check for EC device 2022-04-08 14:24:12 +02:00
pnp
power power: supply: axp288-charger: Set Vhold to 4.4V 2022-04-13 20:59:05 +02:00
powercap
pps
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-04-13 20:59:01 +02:00
pwm
rapidio
ras
regulator regulator: atc260x: Fix missing active_discharge_on setting 2022-04-13 20:59:17 +02:00
remoteproc
reset
rpmsg
rtc rtc: mc146818-lib: fix signedness bug in mc146818_get_time() 2022-04-13 20:59:26 +02:00
s390
sbus
scsi scsi: ufs: ufs-pci: Add support for Intel MTL 2022-04-13 20:59:21 +02:00
sh
siox
slimbus
soc
soundwire
spi spi: core: add dma_map_dev for __spi_unmap_msg() 2022-04-13 20:59:23 +02:00
spmi
ssb
staging staging: wfx: fix an error handling in wfx_init_common() 2022-04-13 20:59:11 +02:00
target
tc
tee
thermal
thunderbolt
tty serial: samsung_tty: do not unlock port->lock for uart_write_wakeup() 2022-04-13 20:59:13 +02:00
uio
usb usb: dwc3: omap: fix "unbalanced disables for smps10_out1" on omap5evm 2022-04-13 20:59:09 +02:00
vdpa vdpa: mlx5: prevent cvq work from hogging CPU 2022-04-13 20:59:15 +02:00
vfio vfio/pci: Stub vfio_pci_vga_rw when !CONFIG_VFIO_PCI_VGA 2022-04-13 20:59:06 +02:00
vhost tuntap: add sanity checks about msg_controllen in sendmsg 2022-04-13 20:59:07 +02:00
video fbdev: Fix unregistering of framebuffers without device 2022-04-13 20:59:24 +02:00
virt
virtio
visorbus
vlynq
vme
w1 w1: w1_therm: fixes w1_seq for ds28ea00 sensors 2022-04-13 20:59:11 +02:00
watchdog watchdog: rti-wdt: Add missing pm_runtime_disable() in probe function 2022-04-08 14:24:11 +02:00
xen swiotlb: Support aligned swiotlb buffers 2022-04-08 14:24:17 +02:00
zorro
Kconfig
Makefile