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

From: Johannes Berg

Date: Mon Sep 14 2026 - 02:27:51 EST


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?

johannes