summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorJiawei Ye <jiawei.ye@foxmail.com>2024-08-29 08:17:09 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-04 16:28:57 +0200
commit84398204c5df5aaf89453056cf0647cda9664d2b (patch)
treea3a6a415d562bc634bbd9eb480e64a7547a8cbe8 /include/net
parent058c9026ad79dc98572442fd4c7e9a36aba6f596 (diff)
downloadlinux-84398204c5df5aaf89453056cf0647cda9664d2b.tar.gz
linux-84398204c5df5aaf89453056cf0647cda9664d2b.tar.bz2
linux-84398204c5df5aaf89453056cf0647cda9664d2b.zip
wifi: wilc1000: fix potential RCU dereference issue in wilc_parse_join_bss_param
[ Upstream commit 6d7c6ae1efb1ff68bc01d79d94fdf0388f86cdd8 ] In the `wilc_parse_join_bss_param` function, the TSF field of the `ies` structure is accessed after the RCU read-side critical section is unlocked. According to RCU usage rules, this is illegal. Reusing this pointer can lead to unpredictable behavior, including accessing memory that has been updated or causing use-after-free issues. This possible bug was identified using a static analysis tool developed by myself, specifically designed to detect RCU-related issues. To address this, the TSF value is now stored in a local variable `ies_tsf` before the RCU lock is released. The `param->tsf_lo` field is then assigned using this local variable, ensuring that the TSF value is safely accessed. Fixes: 205c50306acf ("wifi: wilc1000: fix RCU usage in connect path") Signed-off-by: Jiawei Ye <jiawei.ye@foxmail.com> Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/tencent_466225AA599BA49627FB26F707EE17BC5407@qq.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions