Page MenuHomeFreeBSD

net80211: mitigation against A-MSDU design flaw
ClosedPublic

Authored by bz on Jun 6 2021, 10:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 11:28 AM
Unknown Object (File)
Sat, Apr 20, 12:08 AM
Unknown Object (File)
Fri, Apr 12, 4:40 PM
Unknown Object (File)
Sun, Apr 7, 2:06 PM
Unknown Object (File)
Mar 4 2024, 4:00 AM
Unknown Object (File)
Feb 9 2024, 1:27 AM
Unknown Object (File)
Feb 2 2024, 3:45 AM
Unknown Object (File)
Feb 2 2024, 3:45 AM

Details

Summary

Mitigate A-MSDU injection attacks by detecting if the destination address
of a subframe equals an RFC1042 (i.e., LLC/SNAP) header, and if so
dropping the complete A-MSDU frame. This mitigates known attacks,
although new (unknown) aggregation-based attacks may remain possible.

This defense works because in A-MSDU aggregation injection attacks, a
normal encrypted Wi-Fi frame is turned into an A-MSDU frame. This means
the first 6 bytes of the first A-MSDU subframe correspond to an RFC1042
header. In other words, the destination MAC address of the first A-MSDU
subframe contains the start of an RFC1042 header during an aggregation
attack. We can detect this and thereby prevent this specific attack.

This relates to section 7.2 in the 2021 Usenix "FragAttacks" (Fragment
and Forge: Breaking Wi-Fi Through Frame Aggregation and Fragmentation)
paper.

Submitted by: Mathy Vanhoef (Mathy.Vanhoef kuleuven.be)
Security: CVE-2020-24588
PR: 256119

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jun 6 2021, 10:37 PM

See the PR for the original description/patch. I only updated comments on this one.

markj added inline comments.
sys/net80211/ieee80211_input.c
407

Thanks for looking. If you have time, can you also look at the other two?

sys/net80211/ieee80211_input.c
407

IEEE80211_ADDR_LEN actually then. Will do.

Use the defined Ethernet length instead of a magic number.

bz marked an inline comment as done.Sep 29 2021, 12:59 PM
bz added inline comments.
sys/net80211/ieee80211_input.c
407

aRGH; of course in this case you are right; my bad; sorry for the noise.

If no one has any (further) comments I'll commit these tomorrow morning (UTC).

sys/net80211/ieee80211_input.c
193

I made a comment in D30663 on this

sys/net80211/ieee80211_input.c
193

Noted.
I think something went from with arc --update and relative changes to another non-main branches I think.

bz marked an inline comment as done.

Try to get the proper diff for just this change uploaded again.

sys/net80211/ieee80211_input.c
193

Noted.
I think something went from with arc --update and relative changes to another non-main branches I think.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 30 2021, 2:52 PM
This revision was automatically updated to reflect the committed changes.