From: Johannes Berg <johannes@sipsolutions.net>
To: Slawomir Stepien <sst@poczta.fm>
Cc: syzkaller-bugs@googlegroups.com, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, syzbot@lists.linux.dev,
syzbot+9bdc0c5998ab45b05030@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] mac80211: reject station addition if AP or MLO link is inactive
Date: Fri, 31 Jul 2026 14:40:16 +0200 [thread overview]
Message-ID: <28f4f5b6fbe594c41538d5068b2d77495250ecd7.camel@sipsolutions.net> (raw)
In-Reply-To: <amdckJhgBz7xT2F7@nr200>
On Mon, 2026-07-27 at 15:26 +0200, Slawomir Stepien wrote:
> After taking a closer look at this I wonder how AP_VLAN should be handled? Is there a way on
> cfg80211 level to be able to check AP_VLAN's main device state?
Hmm, yeah that might be an issue? I guess in theory it could track it,
but it doesn't.
> My code change would look something like this:
>
> @@ -9404,6 +9404,12 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
> case NL80211_IFTYPE_AP:
> case NL80211_IFTYPE_AP_VLAN:
> case NL80211_IFTYPE_P2P_GO:
> + /* Add new station only after the AP and link has been started */
> + int link = params.link_sta_params.link_id >= 0 ?
> + params.link_sta_params.link_id : 0;
> + if (!wdev->links[link].ap.beacon_interval)
> + return -ENETDOWN;
> +
> /* ignore WME attributes if iface/sta is not capable */
> if (!(rdev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) ||
> !(params.sta_flags_set & BIT(NL80211_STA_FLAG_WME)))
>
> but the NL80211_IFTYPE_AP_VLAN case would not work here, right? Can I just do the checking only for
> NL80211_IFTYPE_AP and NL80211_IFTYPE_P2P_GO and skip NL80211_IFTYPE_AP_VLAN?
Yeah it'd just reject everything, I guess.
I think in practice stations are added at the AP interface first and
then moved to a VLAN, which would argue for actually rejecting
everything being OK anyway - but then that shouldn't be because of this
but rather by just removing the AP_VLAN case there, or so.
Not sure what the best thing would be though.
johannes
next prev parent reply other threads:[~2026-07-31 12:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 7:45 Slawomir Stepien
2026-07-27 8:19 ` Johannes Berg
2026-07-27 9:22 ` Slawomir Stepien
2026-07-27 9:25 ` Johannes Berg
2026-07-27 10:26 ` Slawomir Stepien
2026-07-27 13:26 ` Slawomir Stepien
2026-07-31 12:40 ` Johannes Berg [this message]
2026-08-03 13:09 ` Slawomir Stepien
2026-08-03 13:15 ` Johannes Berg
2026-07-27 13:44 ` [syzbot ci] " syzbot ci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28f4f5b6fbe594c41538d5068b2d77495250ecd7.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=sst@poczta.fm \
--cc=syzbot+9bdc0c5998ab45b05030@syzkaller.appspotmail.com \
--cc=syzbot@lists.linux.dev \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®