mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/5] wifi: add opt-in FIPS exception for iwlwifi
@ 2026-09-30 12:08 Jose Ignacio Tornos Martinez
  2026-09-30 12:08 ` [PATCH v2 1/5] crypto: fips: add fips_exception kernel boot parameter and fips_allows() helper Jose Ignacio Tornos Martinez
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jose Ignacio Tornos Martinez @ 2026-09-30 12:08 UTC (permalink / raw)
  To: herbert, davem, johannes, miriam.rachel.korenblit
  Cc: ilan.peer, emmanuel.grumbach, linux-crypto, linux-wireless,
	linux-kernel, Jose Ignacio Tornos Martinez

Commits 5241526dede9 ("wifi: mac80211: don't send keys to driver when
fips_enabled") and 0636800c8ee1 ("wifi: iwlwifi: disable certain features
for fips_enabled") disabled WiFi functionality under FIPS mode because
Intel firmware autonomously sends some management frames without
FIPS-validated integrity protection.

While this is technically correct, it leaves FIPS-required environments
with no WiFi connectivity at all, since WPA3-SAE mandates MFP and without
MFP_CAPABLE the client cannot even associate.

The data encryption paths (CCMP/GCMP via PTK/GTK) are handled by mac80211
software crypto using FIPS-approved algorithms on the host CPU. The known
gap was management frame integrity protection on the TX side, where
firmware bypasses the host crypto stack.

This series introduces an opt-in fips_exception=<bitmap> kernel boot
parameter and an exported fips_allows() helper function that allows
administrators who understand the firmware limitation to explicitly
choose connectivity over strict compliance. The FIPS_EXCEPTION flag uses
generic WIFI_MFP naming (not iwlwifi-specific) since the mac80211 key
blocking affects all drivers. The default behavior remains exactly as the
original commits implemented.

v1 (2 patches) unconditionally re-enabled MFP without addressing
the firmware limitation for robust action frames and was rejected.
v2 replaces this with an opt-in exception, extends coverage to all
disabled features (key delivery, Beacon Protection, EHT, 6GHz,
A-MSDU, MLO) and both driver paths (mvm + mld), and adds SW_MGMT_TX
for host-side management frame protection.

AddBA (TX aggregation setup) cannot be fixed this way because firmware
creates these frames autonomously (TX_AMPDU_SETUP_IN_HW), bypassing
mac80211's TX path. The only observed degradation with the exception
active is reduced uplink throughput: firmware-created AddBA requests
are silently discarded by the AP, so TX aggregation is not established.
Downlink aggregation (AP to STA) works normally. No other functionality
is observed to be affected. Since the AP drops unprotected
firmware-autonomous frames rather than accepting them, the system
remains secure — those frames are simply not considered.

Multicast robust management frames (e.g. group-addressed deauth in AP
mode) are protected by IGTK via AES-CMAC/GMAC, which mac80211 handles in
software. Firmware-generated multicast management frames may lack
integrity protection, but a STA does not generate these normally.

Spectrum Management / CSA: a STA does not send CSA (AP-only).
On the RX/STA side, re-enabling MFP and Beacon Protection
(patches 2/3) restores the existing mac80211 protection layers:
1. MFP (patch 3) drops unprotected Spectrum Management action
   frames — these are robust action frames (category 0)
2. Beacon Protection (patch 3) validates beacon CSA IEs via BIGTK
3. Unprotectable Extended CSA (Public action, category 4) only
   blocks TX queues and requires beacon confirmation before channel
   switch (ieee80211_sta_process_chanswitch)
Spectrum Management responses from the STA (e.g. Measurement
Report) are built by mac80211, not firmware, so they go through
the normal TX path and are protected by SW_MGMT_TX (patch 4).
On the TX/AP side, beacons are built from mac80211 template and
protected by Beacon Protection (BIGTK) when re-enabled.

WoWLAN remains disabled under FIPS regardless of the exception flag,
as it requires all traffic to be handled by firmware crypto during
suspend (the host CPU is not available for mac80211 software crypto).

Patch details:
Patch 1: Adds the fips_exception infrastructure (boot parameter,
         read-only sysctl, fips_allows() helper)
Patch 2: Gates the mac80211 key blocking with fips_allows() so keys
         can reach the firmware for data traffic
Patch 3: Gates the iwlwifi feature disabling with fips_allows(),
         restoring MFP, Beacon Protection, EHT, 6GHz, A-MSDU sizes
         and MLO support
Patch 4: Best effort to force software encryption for unicast
         management frames (CCMP/GCMP). It sets
         IEEE80211_KEY_FLAG_SW_MGMT_TX on pairwise CCMP/GCMP keys when the
         exception is active, forcing mac80211 to encrypt unicast robust
         management frames (SA Query, deauth, disassoc) in software using
         FIPS-approved CCMP/GCMP, the same mechanism used by ath9k, ath5k,
         carl9170, mt76x02, rtw88, rtw89, rtlwifi, ... and other drivers.
Patch 5: Reduces firmware decryption error message to debug level in
         FIPS mode. Same as v1 patch 2/2, accepted upstream but not
         yet landed.

Tested on Intel WiFi 6E AX210 with fips=1 fips_exception=0x1:
- WPA3-SAE connection with MFP required succeeds
- iw station dump confirms "MFP: yes"
- Data traffic (TX/RX) works normally

v2: complete, improve and justify
    consider and analyze the feedback from Johannes Berg
v1: https://lore.kernel.org/all/20260629121213.597038-1-jtornosm@redhat.com/

Jose Ignacio Tornos Martinez (5):
  crypto: fips: add fips_exception kernel boot parameter and
    fips_allows() helper
  wifi: mac80211: allow keys to driver with fips_exception
  wifi: iwlwifi: restore FIPS-disabled features with fips_exception
  wifi: iwlwifi: use software crypto for management frames in FIPS
    exception mode
  wifi: iwlwifi: reduce encryption error message to debug level in FIPS
    mode

-- 
2.55.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-30 12:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 12:08 [PATCH v2 0/5] wifi: add opt-in FIPS exception for iwlwifi Jose Ignacio Tornos Martinez
2026-09-30 12:08 ` [PATCH v2 1/5] crypto: fips: add fips_exception kernel boot parameter and fips_allows() helper Jose Ignacio Tornos Martinez
2026-09-30 12:08 ` [PATCH v2 2/5] wifi: mac80211: allow keys to driver with fips_exception Jose Ignacio Tornos Martinez
2026-09-30 12:08 ` [PATCH v2 3/5] wifi: iwlwifi: restore FIPS-disabled features " Jose Ignacio Tornos Martinez
2026-09-30 12:08 ` [PATCH v2 4/5] wifi: iwlwifi: use software crypto for management frames in FIPS exception mode Jose Ignacio Tornos Martinez
2026-09-30 12:08 ` [PATCH v2 5/5] wifi: iwlwifi: reduce encryption error message to debug level in FIPS mode Jose Ignacio Tornos Martinez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®