kernel_samsung_a53x/drivers/net/wireless
Jiawei Ye 42ac5e3f69 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>
2024-11-23 23:21:18 +01:00
..
admtek
ath wifi: ath11k: fix wrong handling of CCMP256 and GCMP ciphers 2024-11-23 23:20:07 +01:00
atmel
broadcom wifi: brcmsmac: advertise MFP_CAPABLE to enable WPA3 2024-11-23 23:21:03 +01:00
cisco
cnss2
cnss_genl
cnss_prealloc
cnss_utils
intel wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead 2024-11-23 23:21:15 +01:00
intersil
marvell wifi: mwifiex: Do not return unused priv in mwifiex_get_priv_by_id() 2024-11-23 23:21:05 +01:00
mediatek wifi: mt76: mt7915: fix rx filter setting for bfee functionality 2024-11-23 23:21:18 +01:00
microchip wifi: wilc1000: fix potential RCU dereference issue in wilc_parse_join_bss_param 2024-11-23 23:21:18 +01:00
qualcomm/qca6490
quantenna wireless: Remove redundant 'flush_workqueue()' calls 2024-11-19 08:44:44 +01:00
ralink wifi: rt2x00: restart beacon queue when hardware reset 2024-11-18 12:13:11 +01:00
realtek wifi: rtw88: always wait for both firmware loading attempts 2024-11-23 23:21:16 +01:00
rsi
scsc
st wifi: cw1200: Avoid processing an invalid TIM IE 2024-11-23 23:20:44 +01:00
ti
zydas
Kconfig
mac80211_hwsim.c
mac80211_hwsim.h
Makefile
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c wireless: Remove redundant 'flush_workqueue()' calls 2024-11-19 08:44:44 +01:00
virt_wifi.c wifi: virt_wifi: don't use strlen() in const context 2024-11-23 23:20:08 +01:00
wl3501.h
wl3501_cs.c