Page MenuHomeFreeBSD

net80211/crypto: LinuxKPI/802.11: introduce IEEE80211_RX_F_PN_VALIDATED
ClosedPublic

Authored by bz on Feb 16 2025, 12:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 22, 1:59 AM
Unknown Object (File)
Wed, Mar 12, 10:43 AM
Unknown Object (File)
Sat, Mar 8, 12:14 PM
Unknown Object (File)
Mon, Feb 24, 3:32 PM
Unknown Object (File)
Feb 24 2025, 5:54 AM
Unknown Object (File)
Feb 19 2025, 6:50 PM
Unknown Object (File)
Feb 16 2025, 8:22 PM

Details

Summary

There are cases when we see "rx seq# violation (CCMP)".

Historically these were AHDEMO/IBBS cases (IEEE80211_KEY_NOREPLAY,
see 5d766a09daab2).

With iwlwifi(4) doing RSS for newer chipsets and us not having any idea
about multiple rx-queues (passed all the way through) leads to the same
problem. An easy way to trigger this is doing an IPv6 all-nodes echo
request. With a sufficient amount of nodes answering the answers will
be hashed to different queues and re-ordering will likely take place
as queues get released individually.
However crypto validation is already done in fw/driver for these cases
and we need to carry the state forward. Add IEEE80211_RX_F_PN_VALIDATED
to indicate that the checks were done passing the information from driver
through LinuxKPI to net80211.
LinuxKPI enforces that a frame was indeed decrypted; otherwise the flag
would be invalid.

This also avoids returning an error and no key from
ieee80211_crypto_decap() and thus avoids dropping the frame.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

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

Event Timeline

bz requested review of this revision.Feb 16 2025, 12:49 AM
adrian added a subscriber: adrian.

Approved; yeah RSS w/ 802.11 requires everything to be offloaded on the seqno/pn side as you've discovered. :-)

What's it look like for the AMPDU RX reordering? Are they doing it in the driver / firmware w/ RSS? Or is linux doing something w/ RSS awareness in mac80211?

This revision is now accepted and ready to land.Feb 16 2025, 1:44 AM