linux-yocto/net/wireless
Mathy Vanhoef ec6392061d 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:35:13 +02:00
..
certs wifi: cfg80211: fix certs build to not depend on file order 2024-01-01 12:42:39 +00:00
.gitignore
ap.c
chan.c
core.c wifi: cfg80211: init wiphy_work before allocating rfkill fails 2025-06-27 11:09:00 +01:00
core.h Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex" 2024-09-30 16:25:14 +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 wifi: cfg80211: fix assoc response warning on failed links 2023-10-23 13:25:30 +02:00
nl80211.c wifi: nl80211: reject cooked mode if it is set along with other flags 2025-03-13 12:58:26 +01:00
nl80211.h wifi: nl80211: Remove unused declaration nl80211_pmsr_dump_results() 2023-08-22 21:40:40 +02:00
ocb.c wifi: cfg80211: ocb: don't leave if not joined 2023-08-22 21:40:39 +02:00
of.c
pmsr.c wifi: cfg80211: pmsr: use correct nla_get_uX functions 2024-06-21 14:38:12 +02:00
radiotap.c
rdev-ops.h wifi: cfg80211: fix 6 GHz scan request building 2024-07-25 09:50:41 +02:00
reg.c wifi: cfg80211: regulatory: improve invalid hints checking 2025-03-13 12:58:26 +01:00
reg.h
scan.c wifi: cfg80211: fix out-of-bounds access during multi-link element defragmentation 2025-05-18 08:24:04 +02:00
sme.c wifi: cfg80211: sme: init n_channels before channels[] access 2024-12-19 18:11:27 +01:00
sysfs.c wifi: cfg80211: fully move wiphy work to unbound workqueue 2024-06-21 14:38:12 +02:00
sysfs.h
trace.c
trace.h wifi: cfg80211: fix the order of arguments for trace events of the tx_rx_evt class 2024-06-12 11:11:22 +02:00
util.c wifi: prevent A-MSDU attacks in mesh networks 2025-07-17 18:35:13 +02:00
wext-compat.c
wext-compat.h
wext-core.c wifi: cfg80211: add a flag to disable wireless extensions 2024-04-03 15:28:54 +02:00
wext-priv.c
wext-proc.c
wext-sme.c
wext-spy.c