Page MenuHomeFreeBSD

[net80211] Add a hardware work around for corrupted CCMP PNs
Needs ReviewPublic

Authored by adrian on May 23 2020, 6:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 2 2024, 10:10 PM
Unknown Object (File)
Dec 20 2023, 8:10 AM
Unknown Object (File)
Sep 19 2023, 1:49 PM
Unknown Object (File)
Jun 3 2023, 8:15 AM
Unknown Object (File)
May 14 2023, 6:51 PM
Unknown Object (File)
Dec 13 2022, 10:02 AM
Unknown Object (File)
Dec 11 2022, 4:06 AM
Subscribers

Details

Reviewers
None
Group Reviewers
wireless
Summary

This is a pretty terrible hack, but here goes.

The atheros NICs have this annoying old bug - occasional CCMP PN
corruption. It shows up as a bit flipped somewhere in the PN
space. I remember looking into this years ago and IIRC it's
a receiver bug, NOT a transmitter side bug.

Anyway, it shows up as a bit flipped, but decryption is OK.
The next packet is almost always back to the original PN sequence
number space. However if it's a bit flipped high in the 48
bit PN space, every subsequent frame is going to be marked as
CCMP replay and dropped and this won't be fixed without reassociating.

Now, this solution works - and yeah, should be done for TKIP too -
but it likely should be done only for hardware that requires it.
But doing it in the driver is .. not very nice.

So the solution:

  • If a big PN jump is seen, tag it as suspect and accept
  • If the next seen PN is between the suspect PN and previous received PN, that's the new received PN and accept
  • If the next seen PN is above the suspect PN, that's the new received PN and accept
  • Anything else? It's lower than either and is rejected as a replay.

I've seen corruption in PN bits all throughout the 48 bit address
space. It's quite annoying.

I'm not sure I want to land this patch in its current state but it
does fix a problem that I can reproduce with a few hours of watching
a video stream, so it's not exactly uncommon with today's traffic
patterns.

Test Plan
  • ath(4) in STA and AP modes - AR9280, AR9344 (SoC), AR9380, AR9580.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31263
Build 28909: arc lint + arc unit