Re: [PATCH] wifi: mac80211: verify if AP_VLAN belongs to the correct AP

From: Slawomir Stepien

Date: Mon Sep 14 2026 - 03:32:53 EST


On wrz 14, 2026 08:27, Johannes Berg wrote:
> On Thu, 2026-09-10 at 10:04 +0200, Slawomir Stepien wrote:
> > The get_vlan() only checks if NL80211_ATTR_STA_VLAN target is an
> > AP/AP_VLAN/P2P_GO interface on the same wiphy. It has no notion of which
> > specific AP a given AP_VLAN belongs to. Without a check in mac80211
> > itself, NL80211_CMD_NEW_STATION and NL80211_CMD_SET_STATION could
> > add/move a station onto an AP_VLAN interface that actually belongs to a
> > different AP on the same wiphy.
> >
> > Reject the userspace request unless the VLAN interface's bss pointer
> > matches the bss of the interface the station is being added to/belongs
> > to.
>
> Hmm. I thought I mentioned earlier that AP_VLAN belongs to AP whenever
> their addresses are the same - doesn't that mean this validation can be
> in cfg80211?

Yeah, my bad, I've fixed on mac80211 in my mind. Let me check how I can compare the addresseses in
get_vlan().

--
Slawomir Stepien