linux-yocto/net/wireless
Mathy Vanhoef e2c8a3c038 wifi: prevent A-MSDU attacks in mesh networks
commit 737bb912eb upstream.

This patch is a mitigation to prevent the A-MSDU spoofing vulnerability
for mesh networks. The initial update to the IEEE 802.11 standard, in
response to the FragAttacks, missed this case (CVE-2025-27558). It can
be considered a variant of CVE-2020-24588 but for mesh networks.

This patch tries to detect if a standard MSDU was turned into an A-MSDU
by an adversary. This is done by parsing a received A-MSDU as a standard
MSDU, calculating the length of the Mesh Control header, and seeing if
the 6 bytes after this header equal the start of an rfc1042 header. If
equal, this is a strong indication of an ongoing attack attempt.

This defense was tested with mac80211_hwsim against a mesh network that
uses an empty Mesh Address Extension field, i.e., when four addresses
are used, and when using a 12-byte Mesh Address Extension field, i.e.,
when six addresses are used. Functionality of normal MSDUs and A-MSDUs
was also tested, and confirmed working, when using both an empty and
12-byte Mesh Address Extension field.

It was also tested with mac80211_hwsim that A-MSDU attacks in non-mesh
networks keep being detected and prevented.

Note that the vulnerability being patched, and the defense being
implemented, was also discussed in the following paper and in the
following IEEE 802.11 presentation:

https://papers.mathyvanhoef.com/wisec2025.pdf
https://mentor.ieee.org/802.11/dcn/25/11-25-0949-00-000m-a-msdu-mesh-spoof-protection.docx

Cc: stable@vger.kernel.org
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
Link: https://patch.msgid.link/20250616004635.224344-1-Mathy.Vanhoef@kuleuven.be
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-17 18:32:08 +02:00
..
certs
.gitignore
ap.c
chan.c
core.c wifi: cfg80211: init wiphy_work before allocating rfkill fails 2025-06-27 11:07:37 +01:00
core.h Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex" 2024-09-30 16:23:55 +02:00
debugfs.c
debugfs.h
ethtool.c
ibss.c
Kconfig
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c
lib80211.c
Makefile
mesh.c
mlme.c
nl80211.c wifi: nl80211: reject cooked mode if it is set along with other flags 2025-03-13 12:53:14 +01:00
nl80211.h
ocb.c
of.c
pmsr.c wifi: cfg80211: pmsr: use correct nla_get_uX functions 2024-06-21 14:35:31 +02:00
radiotap.c
rdev-ops.h wifi: cfg80211: fix 6 GHz scan request building 2024-07-25 09:49:09 +02:00
reg.c wifi: cfg80211: regulatory: improve invalid hints checking 2025-03-13 12:53:14 +01:00
reg.h
scan.c wifi: cfg80211: adjust allocation of colocated AP data 2025-02-21 13:49:05 +01:00
sme.c wifi: cfg80211: fix two more possible UBSAN-detected off-by-one errors 2024-10-17 15:20:41 +02:00
sysfs.c wifi: cfg80211: fully move wiphy work to unbound workqueue 2024-06-21 14:35:31 +02:00
sysfs.h
trace.c
trace.h
util.c wifi: prevent A-MSDU attacks in mesh networks 2025-07-17 18:32:08 +02:00
wext-compat.c
wext-compat.h
wext-core.c
wext-priv.c
wext-proc.c
wext-sme.c
wext-spy.c