* [PATCH v6 wireless] mac80211: fix NULL pointer dereference in monitor mode
@ 2026-02-05 17:52 Dhyan K Prajapati
2026-02-06 0:20 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Dhyan K Prajapati @ 2026-02-05 17:52 UTC (permalink / raw)
To: Greg KH
Cc: Johannes Berg, linux-wireless, netdev, stable, Dhyan K Prajapati,
Johannes Berg
Crash trace:
RIP: iwlagn_bss_info_changed+0x19d/0x640 [iwldvm]
Code: 49 8b 46 10 <8b> 10
RAX: 0000000000000000 (NULL link->conf->bss)
wifi: mac80211: fix NULL pointer deref regression in link notify
Commit c57e5b974514 ("wifi: mac80211: fix WARN_ON for monitor mode on
some devices") reorganized link change notifications. This caused a
regression for hardware using IEEE80211_HW_WANT_MONITOR_VIF. In monitor
mode, link->conf->bss is uninitialized, but current logic allows these
notifications to reach driver callbacks, causing a deterministic NULL
dereference in drivers like iwldvm. Fix this by validating the BSS
context before driver notification.
Device: Intel Centrino Advanced-n 6205
Fixes: c57e5b974514 ("wifi: mac80211: fix WARN_ON for monitor mode on some devices")
Cc: stable@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dhyan K Prajapati <dhyaan19022009@gmail.com>
---
net/mac80211/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index b05e313c7..190222c26 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -416,6 +416,8 @@ void ieee80211_link_info_change_notify(struct ieee80211_sub_if_data *sdata,
case NL80211_IFTYPE_MONITOR:
if (!ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
return;
+ if (!link->conf->bss)
+ return;
break;
default:
break;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v6 wireless] mac80211: fix NULL pointer dereference in monitor mode
2026-02-05 17:52 [PATCH v6 wireless] mac80211: fix NULL pointer dereference in monitor mode Dhyan K Prajapati
@ 2026-02-06 0:20 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2026-02-06 0:20 UTC (permalink / raw)
To: Dhyan K Prajapati
Cc: Greg KH, Johannes Berg, linux-wireless, netdev, stable,
Dhyan K Prajapati, Johannes Berg
On Thu, 5 Feb 2026 23:22:13 +0530 Dhyan K Prajapati wrote:
> Cc: netdev@vger.kernel.org
If you have to CC netdev on your failed attempts to produce a patch
please follow our posting guidance:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#tl-dr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-06 0:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-05 17:52 [PATCH v6 wireless] mac80211: fix NULL pointer dereference in monitor mode Dhyan K Prajapati
2026-02-06 0:20 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox