Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

staging: rtl8723bs: fix null dereference in find_network

The variable pwlan has the possibility of being NULL when passed into
rtw_free_network_nolock() which would later dereference the variable.

Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Cc: stable@vger.kernel.org
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Link: https://patch.msgid.link/20260202205429.20181-1-ethantidmore06@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ethan Tidmore and committed by
Greg Kroah-Hartman
41460a19 17d2ff40

+4 -2
+4 -2
drivers/staging/rtl8723bs/core/rtw_mlme.c
··· 826 826 struct wlan_network *tgt_network = &pmlmepriv->cur_network; 827 827 828 828 pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.mac_address); 829 - if (pwlan) 830 - pwlan->fixed = false; 829 + if (!pwlan) 830 + return; 831 + 832 + pwlan->fixed = false; 831 833 832 834 if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) && 833 835 (adapter->stapriv.asoc_sta_count == 1))