linux-stable/net/wireless
Johannes Berg 930e826962 wifi: nl80211: reject iftype change with mesh ID change
commit f78c137533 upstream.

It's currently possible to change the mesh ID when the
interface isn't yet in mesh mode, at the same time as
changing it into mesh mode. This leads to an overwrite
of data in the wdev->u union for the interface type it
currently has, causing cfg80211_change_iface() to do
wrong things when switching.

We could probably allow setting an interface to mesh
while setting the mesh ID at the same time by doing a
different order of operations here, but realistically
there's no userspace that's going to do this, so just
disallow changes in iftype when setting mesh ID.

Cc: stable@vger.kernel.org
Fixes: 29cbe68c51 ("cfg80211/mac80211: add mesh join/leave commands")
Reported-by: syzbot+dd4779978217b1973180@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-06 14:45:10 +00:00
..
certs wifi: cfg80211: fix certs build to not depend on file order 2024-01-01 12:39:02 +00:00
.gitignore
Kconfig
Makefile
ap.c
chan.c
core.c wifi: cfg80211: fix wiphy delayed work queueing 2024-02-23 09:12:44 +01:00
core.h wifi: cfg80211: fix CQM for non-range use 2024-01-01 12:39:09 +00:00
debugfs.c
debugfs.h
ethtool.c
ibss.c
lib80211.c
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c
mesh.c
mlme.c wifi: cfg80211: reject auth/assoc to AP with our address 2023-09-23 11:11:03 +02:00
nl80211.c wifi: nl80211: reject iftype change with mesh ID change 2024-03-06 14:45:10 +00:00
nl80211.h
ocb.c wifi: cfg80211: ocb: don't leave if not joined 2023-09-23 11:11:03 +02:00
of.c
pmsr.c
radiotap.c
rdev-ops.h
reg.c
reg.h
scan.c wifi: cfg80211: fix RCU dereference in __cfg80211_bss_update 2024-02-05 20:13:00 +00:00
sme.c wifi: cfg80211: hold wiphy lock in auto-disconnect 2023-10-10 22:00:39 +02:00
sysfs.c wifi: cfg80211: add flush functions for wiphy work 2023-11-20 11:51:51 +01:00
sysfs.h
trace.c
trace.h
util.c wifi: cfg80211: remove links only on AP 2023-09-13 09:42:24 +02:00
wext-compat.c
wext-compat.h
wext-core.c
wext-priv.c
wext-proc.c
wext-sme.c
wext-spy.c