linux-stable/drivers
Po-Hao Huang ec5da191bf rtw88: fix memory overrun and memory leak during hw_scan
[ Upstream commit d95984b558 ]

Previously we allocated less memory than actual required, overwrite
to the buffer causes the mm module to complaint and raise access
violation faults. Along with potential memory leaks when returned
early. Fix these by passing the correct size and proper deinit flow.

Fixes: 10d162b2ed ("rtw88: 8822c: add ieee80211_ops::hw_scan")
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220121070813.9656-4-pkshih@realtek.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 13:57:59 +02:00
..
accessibility speakup-dectlk: Restore pitch setting 2022-02-08 12:15:04 +01:00
acpi ACPI: APEI: fix return value of __setup handlers 2022-04-08 13:57:37 +02:00
amba
android
ata ata: pata_hpt37x: disable primary channel on HPT371 2022-02-23 09:39:37 +09:00
atm atm: eni: Add check for dma_map_single 2022-03-15 11:01:52 +00:00
auxdisplay auxdisplay: lcd2s: Use proper API to free the instance of charlcd object 2022-03-03 00:30:31 +01:00
base drivers/base/memory: add memory block to memory group after registration succeeded 2022-04-08 13:57:41 +02:00
bcma
block drbd: fix potential silent data corruption 2022-04-08 13:57:23 +02:00
bluetooth Bluetooth: btmtksdio: mask out interrupt status 2022-04-08 13:57:57 +02:00
bus bus: mhi: Fix MHI DMA structure endianness 2022-04-08 13:57:14 +02:00
cdrom
char hwrng: nomadik - Change clk_disable to clk_disable_unprepare 2022-04-08 13:57:38 +02:00
clk clk: uniphier: Fix fixed-rate initialization 2022-04-08 13:57:16 +02:00
clocksource clocksource: acpi_pm: fix return value of __setup handler 2022-04-08 13:57:38 +02:00
comedi
connector
counter counter: Stop using dev_get_drvdata() to get the counter device 2022-03-15 19:24:13 +01:00
cpufreq cpufreq: qcom-hw: Delay enabling throttle_irq 2022-02-09 13:18:49 +05:30
cpuidle cpuidle: qcom-spm: Check if any CPU is managed by SPM 2022-04-08 13:57:46 +02:00
crypto crypto: qat - fix initialization of pfvf rts_map_msg structures 2022-04-08 13:57:38 +02:00
cxl
dax
dca
devfreq
dio
dma dmaengine: shdma: Fix runtime PM imbalance on error 2022-02-15 11:04:16 +05:30
dma-buf udmabuf: validate ubuf->pagecount 2022-04-08 13:57:56 +02:00
edac EDAC: Fix calculation of returned address and next offset in edac_align_ptr() 2022-02-15 15:54:46 +01:00
eisa
extcon
firewire
firmware firmware: qcom: scm: Remove reassignment to desc following initializer 2022-04-08 13:57:44 +02:00
fpga
fsi
gnss
gpio Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)" 2022-03-15 09:59:08 -07:00
gpu drm/amd/pm: return -ENOTSUPP if there is no get_dpm_ultimate_freq function 2022-04-08 13:57:58 +02:00
greybus greybus: svc: fix an error handling bug in gb_svc_hello() 2022-04-08 13:57:16 +02:00
hid HID: intel-ish-hid: Use dma_alloc_coherent for firmware update 2022-04-08 13:57:17 +02:00
hsi
hv Drivers: hv: utils: Make use of the helper macro LIST_HEAD() 2022-02-09 14:33:21 +00:00
hwmon hwmon: (pmbus) Add Vin unit off handling 2022-04-08 13:57:38 +02:00
hwspinlock
hwtracing coresight: syscfg: Fix memleak on registration failure in cscfg_create_device 2022-04-08 13:57:14 +02:00
i2c i2c: brcmstb: fix support for DSL and CM variants 2022-02-18 10:37:33 +01:00
i3c
idle
iio iio: inkern: make a best effort on offset calculation 2022-04-08 13:57:16 +02:00
infiniband RDMA/core: Set MR type in ib_reg_user_mr 2022-04-08 13:57:59 +02:00
input Revert "Input: clear BTN_RIGHT/MIDDLE on buttonpads" 2022-04-08 13:57:21 +02:00
interconnect
iommu iommu/iova: Improve 32-bit free space estimate 2022-04-08 13:57:13 +02:00
ipack
irqchip irqchip/sifive-plic: Add missing thead,c900-plic match string 2022-02-02 10:49:29 +00:00
isdn isdn: hfcpci: check the return value of dma_set_mask() in setup_hw() 2022-03-07 11:27:12 +00:00
leds
macintosh
mailbox mailbox: tegra-hsp: Flush whole channel 2022-04-08 13:57:26 +02:00
mcb
md bcache: fixup multiple threads crash 2022-04-08 13:57:28 +02:00
media ivtv: fix incorrect device_caps for ivtvfb 2022-04-08 13:57:52 +02:00
memory memory: emif: check the pointer temp in get_device_details() 2022-04-08 13:57:50 +02:00
memstick
message
mfd
misc mei: avoid iterator usage outside of list_for_each_entry 2022-04-08 13:57:14 +02:00
mmc mmc: davinci_mmc: Handle error for clk_enable 2022-04-08 13:57:53 +02:00
most
mtd mtd: rawnand: gpmi: fix controller timings setting 2022-04-08 13:57:57 +02:00
mux
net rtw88: fix memory overrun and memory leak during hw_scan 2022-04-08 13:57:59 +02:00
nfc NFC: port100: fix use-after-free in port100_send_complete 2022-03-09 19:59:34 -08:00
ntb
nubus
nvdimm
nvme nvme: fix the check for duplicate unique identifiers 2022-04-08 13:57:35 +02:00
nvmem nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios property 2022-02-21 17:59:25 +01:00
of of/fdt: move elfcorehdr reservation early for crash dump kernel 2022-02-17 17:13:52 -06:00
opp
parisc
parport
pci PCI: xgene: Revert "PCI: xgene: Fix IB window setup" 2022-04-08 13:57:31 +02:00
pcmcia
perf perf/arm-cmn: Update watchpoint format 2022-04-08 13:57:37 +02:00
phy phy: dphy: Correct clk_pre parameter 2022-02-02 10:33:04 +05:30
pinctrl pinctrl: samsung: Remove EINT handler for Exynos850 ALIVE and CMGP gpios 2022-04-08 13:57:41 +02:00
platform surface: surface3_power: Fix battery readings on batteries without a serial number 2022-02-24 13:48:39 +01:00
pnp
power power: supply: bq256xx: Handle OOM correctly 2022-02-11 21:19:51 +01:00
powercap
pps
ps3
ptp ptp: ocp: Add ptp_ocp_adjtime_coarse for large adjustments 2022-03-02 09:51:21 -08:00
pwm
rapidio
ras
regulator regulator: qcom_smd: fix for_each_child.cocci warnings 2022-04-08 13:57:32 +02:00
remoteproc remoteproc: Fix count check in rproc_coredump_write() 2022-04-08 13:57:18 +02:00
reset
rpmsg
rtc rtc: pl031: fix rtc features null pointer dereference 2022-04-08 13:57:22 +02:00
s390 s390/cio: verify the driver availability for path_event call 2022-02-09 22:55:01 +01:00
sbus
scsi scsi: libsas: Fix sas_ata_qc_issue() handling of NCQ NON DATA commands 2022-04-08 13:57:20 +02:00
sh
siox
slimbus
soc soc: mediatek: pm-domains: Add wakeup capacity support in power domain 2022-04-08 13:57:49 +02:00
soundwire
spi spi: spi-zynqmp-gqspi: Handle error for dma_set_mask 2022-04-08 13:57:36 +02:00
spmi
ssb
staging media: hantro: sunxi: Fix VP9 steps 2022-04-08 13:57:48 +02:00
target
tc
tee OP-TEE fix error return code in probe functions 2022-02-18 17:30:01 +01:00
thermal thermal: int340x: Check for NULL after calling kmemdup() 2022-04-08 13:57:33 +02:00
thunderbolt
tty TTY/Serial driver fixes for 5.17-rc6 2022-02-25 11:45:29 -08:00
uio
usb xhci: fix uninitialized string returned by xhci_decode_ctrl_ctx() 2022-04-08 13:57:14 +02:00
vdpa vdpa: fix use-after-free on vp_vdpa_remove 2022-03-06 06:06:50 -05:00
vfio
vhost Networking fixes for 5.17-final, including fixes from netfilter, ipsec, 2022-03-17 12:55:26 -07:00
video video: fbdev: omapfb: Add missing of_node_put() in dvic_probe_of 2022-04-08 13:57:51 +02:00
virt
virtio virtio: drop default for virtio-mem 2022-03-06 06:06:50 -05:00
visorbus
vlynq
vme
w1
watchdog
xen xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-07 09:48:55 +01:00
zorro
Kconfig
Makefile