summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMoon Hee Lee <moonhee.lee.ca@gmail.com>2025-12-15 19:59:32 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-02-11 13:35:29 +0100
commitb04c75366a5471ae2dd7f4c33b7f1e2c08b9b32d (patch)
treeb95c3105e3dd548f3b8db7b7dd8e5f9b4646c449 /net
parent9a6cdfd7b6aaa050f811b2dae2ac9b49ec0b665c (diff)
wifi: mac80211: ocb: skip rx_no_sta when interface is not joined
[ Upstream commit ff4071c60018a668249dc6a2df7d16330543540e ] ieee80211_ocb_rx_no_sta() assumes a valid channel context, which is only present after JOIN_OCB. RX may run before JOIN_OCB is executed, in which case the OCB interface is not operational. Skip RX peer handling when the interface is not joined to avoid warnings in the RX path. Reported-by: syzbot+b364457b2d1d4e4a3054@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=b364457b2d1d4e4a3054 Tested-by: syzbot+b364457b2d1d4e4a3054@syzkaller.appspotmail.com Signed-off-by: Moon Hee Lee <moonhee.lee.ca@gmail.com> Link: https://patch.msgid.link/20251216035932.18332-1-moonhee.lee.ca@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ocb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/ocb.c b/net/mac80211/ocb.c
index 9713e53f11b1..6688b1dd8aaa 100644
--- a/net/mac80211/ocb.c
+++ b/net/mac80211/ocb.c
@@ -47,6 +47,9 @@ void ieee80211_ocb_rx_no_sta(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta;
int band;
+ if (!ifocb->joined)
+ return;
+
/* XXX: Consider removing the least recently used entry and
* allow new one to be added.
*/