mirror-linux/net/wireless
Mathy Vanhoef 737bb912eb wifi: prevent A-MSDU attacks in mesh networks
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>
2025-07-07 10:54:13 +02:00
..
certs
tests wireless-next patches for v6.14 2024-12-19 18:54:07 -08:00
.gitignore
Kconfig
Makefile
ap.c
chan.c wifi: cfg80211: expose cfg80211_chandef_get_width() 2025-03-12 09:50:24 +01:00
core.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
core.h wifi: cfg80211: move link reconfig parameters into a struct 2025-03-11 10:51:58 +01:00
debugfs.c
debugfs.h
ethtool.c
ibss.c
mesh.c
mlme.c wifi: cfg80211: Update the link address when a link is added 2025-03-11 10:53:10 +01:00
nl80211.c wifi: cfg80211: fix S1G beacon head validation in nl80211 2025-06-30 15:33:46 +02:00
nl80211.h wifi: cfg80211: Add support for dynamic addition/removal of links 2025-01-13 15:34:08 +01:00
ocb.c
of.c
pmsr.c wifi: cfg80211: define and use wiphy guard 2024-12-04 16:10:52 +01:00
radiotap.c Merge net-next/main to resolve conflicts 2024-10-09 08:59:22 +02:00
rdev-ops.h wifi: cfg80211: move link reconfig parameters into a struct 2025-03-11 10:51:58 +01:00
reg.c Merge net-next/main to resolve conflicts 2025-03-18 09:46:36 +01:00
reg.h
scan.c wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements 2025-06-05 11:32:16 +02:00
sme.c wireless-next patches for v6.14 2024-12-19 18:54:07 -08:00
sysfs.c
sysfs.h
trace.c
trace.h wifi: cfg80211: allow setting extended MLD capa/ops 2025-03-11 10:51:59 +01:00
util.c wifi: prevent A-MSDU attacks in mesh networks 2025-07-07 10:54:13 +02:00
wext-compat.c wifi: cfg80211: send MLO links tx power info in GET_INTERFACE 2024-12-04 16:14:46 +01:00
wext-compat.h
wext-core.c net: remove get_task_comm() and print task comm directly 2025-01-12 20:21:16 -08:00
wext-priv.c
wext-proc.c
wext-sme.c wifi: cfg80211: define and use wiphy guard 2024-12-04 16:10:52 +01:00