Re: [PATCH v2] mac80211: reject station addition if AP or MLO link is inactive

Johannes Berg <[email protected]> Mon, 27 Jul 2026 10:19:05 +0200
Newsgroups dev.linux.lists.syzbot,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
Hi,

On Mon, 2026-07-27 at 09:45 +0200, Slawomir Stepien wrote:
> Currently, userspace can issue a netlink command to add a station to
> an AP or P2P GO interface before the AP has fully started, or before
> a specific MLO link has begun beaconing. This will e.g. lead to a
> WARN_ON trigger:
> 
> WARNING: net/mac80211/rate.c:51 at rate_control_rate_init+0x5a6/0x630
> ...
> Call Trace:
>  <TASK>
>  rate_control_rate_init_all_links+0xf4/0x190 net/mac80211/rate.c:84
>  sta_apply_auth_flags+0x1bc/0x430 net/mac80211/cfg.c:2152
>  sta_apply_parameters+0x126d/0x1b10 net/mac80211/cfg.c:2618
>  ieee80211_add_station+0x3de/0x700 net/mac80211/cfg.c:2684
>  rdev_add_station+0xfc/0x290 net/wireless/rdev-ops.h:201
>  nl80211_new_station+0x1b4e/0x1fd0 net/wireless/nl80211.c:9505
> 
> Fix this by introducing a two-tiered active state check in
> ieee80211_add_station():

Shouldn't we have enough information in cfg80211 to validate it there,
benefiting other drivers?

johannes