summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/ipw2x00/ipw2100.c
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2018-12-14 11:55:21 +0800
committerKalle Valo <kvalo@codeaurora.org>2018-12-20 08:49:37 +0200
commit4f68ef64cd7feb1220232bd8f501d8aad340a099 (patch)
treeb6d9ee5f7b9342b98e37c18967613e9ff638a861 /drivers/net/wireless/intel/ipw2x00/ipw2100.c
parent861cb5eb467f5e38dce1aabe4e8db379255bd89b (diff)
downloadlinux-stable-4f68ef64cd7feb1220232bd8f501d8aad340a099.tar.gz
linux-stable-4f68ef64cd7feb1220232bd8f501d8aad340a099.tar.bz2
linux-stable-4f68ef64cd7feb1220232bd8f501d8aad340a099.zip
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>
Diffstat (limited to 'drivers/net/wireless/intel/ipw2x00/ipw2100.c')
0 files changed, 0 insertions, 0 deletions