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
F137885490: D49029.diff
Wed, Nov 26, 9:15 PM
Unknown Object (File)
Oct 24 2025, 12:28 AM
Unknown Object (File)
Oct 23 2025, 3:24 PM
Unknown Object (File)
Oct 23 2025, 3:24 PM
Unknown Object (File)
Oct 23 2025, 3:24 PM
Unknown Object (File)
Oct 23 2025, 6:46 AM
Unknown Object (File)
Oct 13 2025, 4:43 AM
Unknown Object (File)
Oct 13 2025, 3:29 AM

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