]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mac80211: reject address change while connecting
authorJohannes Berg <johannes.berg@intel.com>
Wed, 5 Nov 2025 14:41:19 +0000 (15:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:12:35 +0000 (06:12 +0900)
commite4f00627d0e1b7674572f10b19c2644dcf94f8e1
tree99bf1139e10cfd86864af584aca2e483ee89292e
parentb8a44407bdaf2f0c5505cc7d9fc7d8da90cf9a94
wifi: mac80211: reject address change while connecting

commit a9da90e618cd0669a22bcc06a96209db5dd96e9b upstream.

While connecting, the MAC address can already no longer be
changed. The change is already rejected if netif_carrier_ok(),
but of course that's not true yet while connecting. Check for
auth_data or assoc_data, so the MAC address cannot be changed.

Also more comprehensively check that there are no stations on
the interface being changed - if any peer station is added it
will know about our address already, so we cannot change it.

Cc: stable@vger.kernel.org
Fixes: 3c06e91b40db ("wifi: mac80211: Support POWERED_ADDR_CHANGE feature")
Link: https://patch.msgid.link/20251105154119.f9f6c1df81bb.I9bb3760ede650fb96588be0d09a5a7bdec21b217@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/iface.c