diff options
author | Siddh Raman Pant <code@siddh.me> | 2022-08-14 20:45:12 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-08 12:28:07 +0200 |
commit | 552ba102a6898630a7d16887f29e606d6fabe508 (patch) | |
tree | c033b9d125f0c95038685b6a8227843d5ad7d2ed /net/ceph/Makefile | |
parent | 253ec5fb84057c681a30d20314b8662fe424e3df (diff) | |
download | linux-stable-552ba102a6898630a7d16887f29e606d6fabe508.tar.gz linux-stable-552ba102a6898630a7d16887f29e606d6fabe508.tar.bz2 linux-stable-552ba102a6898630a7d16887f29e606d6fabe508.zip |
wifi: mac80211: Don't finalize CSA in IBSS mode if state is disconnected
commit 15bc8966b6d3a5b9bfe4c9facfa02f2b69b1e5f0 upstream.
When we are not connected to a channel, sending channel "switch"
announcement doesn't make any sense.
The BSS list is empty in that case. This causes the for loop in
cfg80211_get_bss() to be bypassed, so the function returns NULL
(check line 1424 of net/wireless/scan.c), causing the WARN_ON()
in ieee80211_ibss_csa_beacon() to get triggered (check line 500
of net/mac80211/ibss.c), which was consequently reported on the
syzkaller dashboard.
Thus, check if we have an existing connection before generating
the CSA beacon in ieee80211_ibss_finish_csa().
Cc: stable@vger.kernel.org
Fixes: cd7760e62c2a ("mac80211: add support for CSA in IBSS mode")
Link: https://syzkaller.appspot.com/bug?id=05603ef4ae8926761b678d2939a3b2ad28ab9ca6
Reported-by: syzbot+b6c9fe29aefe68e4ad34@syzkaller.appspotmail.com
Signed-off-by: Siddh Raman Pant <code@siddh.me>
Tested-by: syzbot+b6c9fe29aefe68e4ad34@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20220814151512.9985-1-code@siddh.me
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ceph/Makefile')
0 files changed, 0 insertions, 0 deletions