linux_dsm_epyc7002/drivers/net/wireless/st/cw1200
Jia-Ju Bai 4f68ef64cd cw1200: Fix concurrency use-after-free bugs in cw1200_hw_scan()
The function cw1200_bss_info_changed() and cw1200_hw_scan() can be
concurrently executed.
The two functions both access a possible shared variable "frame.skb".

This shared variable is freed by dev_kfree_skb() in cw1200_upload_beacon(),
which is called by cw1200_bss_info_changed(). The free operation is
protected by a mutex lock "priv->conf_mutex" in cw1200_bss_info_changed().

In cw1200_hw_scan(), this shared variable is accessed without the
protection of the mutex lock "priv->conf_mutex".
Thus, concurrency use-after-free bugs may occur.

To fix these bugs, the original calls to mutex_lock(&priv->conf_mutex) and
mutex_unlock(&priv->conf_mutex) are moved to the places, which can
protect the accesses to the shared variable.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-12-20 08:49:37 +02:00
..
bh.c
bh.h
cw1200_sdio.c cw1200: add const to hwbus_ops structures 2017-06-28 21:17:46 +03:00
cw1200_spi.c cw1200: add const to hwbus_ops structures 2017-06-28 21:17:46 +03:00
cw1200.h
debug.c cw1200: convert to DEFINE_SHOW_ATTRIBUTE 2018-12-20 08:46:32 +02:00
debug.h
fwio.c
fwio.h
hwbus.h
hwio.c
hwio.h
Kconfig
main.c wireless: Use octal not symbolic permissions 2018-03-27 11:01:13 +03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pm.c net/cw1200: Convert timers to use timer_setup() 2017-10-18 12:39:38 +01:00
pm.h wireless: cw1200: use __maybe_unused to hide pm functions_ 2016-03-08 12:32:52 +02:00
queue.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
queue.h
scan.c cw1200: Fix concurrency use-after-free bugs in cw1200_hw_scan() 2018-12-20 08:49:37 +02:00
scan.h
sta.c cw1200: fix small typo 2018-11-06 19:03:56 +02:00
sta.h cw1200: Convert timers to use timer_setup() 2017-10-27 10:46:24 +03:00
txrx.c cw1200: Remove extra parentheses 2018-08-31 18:42:25 +03:00
txrx.h
wsm.c cw1200: fix bogus maybe-uninitialized warning 2016-11-17 08:47:58 +02:00
wsm.h