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)
Wed, Nov 6, 12:01 PM
Unknown Object (File)
Tue, Oct 29, 1:54 PM
Unknown Object (File)
Thu, Oct 24, 5:47 PM
Unknown Object (File)
Oct 5 2024, 1:33 AM
Unknown Object (File)
Oct 4 2024, 8:46 AM
Unknown Object (File)
Oct 3 2024, 10:09 AM
Unknown Object (File)
Oct 3 2024, 9:34 AM
Unknown Object (File)
Oct 3 2024, 7:10 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41855
Build 38743: arc lint + arc unit

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.