1
1
openwrt/package
Hauke Mehrtens 68165c85c8 wifi-scripts: ucode: default BIP cipher from wpa_pairwise
The WPA3 and Wi-Fi Enhanced Open Deployment and Implementation Guide
v1.1 (Tables 4, 5, 6) requires the group-management cipher (BIP) to
match the mode and strength of the pairwise cipher: GCM-mode pairwise
ciphers pair with BIP-GMAC integrity, CCM-mode pairwise ciphers with
BIP-CMAC integrity.  The ucode pipeline hard-coded group_mgmt_cipher
to AES-128-CMAC (BIP-CMAC-128) regardless of the pairwise cipher,
except for the eap192 special case that already forced BIP-GMAC-256.
An EHT WPA3-Personal BSS therefore emitted wpa_pairwise=GCMP-256
alongside group_mgmt_cipher=AES-128-CMAC -- the integrity cipher two
steps weaker than the data cipher and a spec violation on EHT.

hostapd has a single group_mgmt_cipher knob, so the selected BIP has
to be compatible with every pairwise cipher in wpa_pairwise.  Picking
from the first token would mis-select on mixed lists -- e.g.
wpa_pairwise=\"GCMP-256 CCMP\" would yield BIP-GMAC-256, which a
CCMP-only STA cannot negotiate.

Walk the wpa_pairwise tokens and pick the BIP that matches the
weakest cipher present:

  CCMP / TKIP -> AES-128-CMAC (BIP-CMAC-128)
  CCMP-256    -> BIP-CMAC-256
  GCMP        -> BIP-GMAC-128
  GCMP-256    -> BIP-GMAC-256

Token matching uses fnmatch wildcards against a copy of wpa_pairwise
that is padded with leading and trailing spaces, so each token is
space-bounded regardless of its position in the list.

The RSN override pairwise lists are not consulted: in the only
caller that sets them (WPA3-Personal Compatibility Mode), Tables 6
and 7 require BIP-CMAC-128 across RSNE/RSNOE/RSNO2E even when the
override lists advertise GCMP-256, so wpa_pairwise=CCMP already
yields the correct BIP.

An explicit ieee80211w_mgmt_cipher UCI value still wins over the
derived default.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Link: https://github.com/openwrt/openwrt/pull/23009
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-02 20:34:22 +02:00
..
base-files dropbear: don't spread conffiles across two packages 2026-04-29 09:32:03 +02:00
boot uboot-at91: fix wrong BUILD_DEVICES for sama5d4_xplained_nandflash 2026-04-20 18:07:56 +02:00
devel package: binutils: deduplicate ld 2026-04-18 19:34:21 +02:00
firmware wireless-regdb: update to version 2026.03.18 2026-04-30 02:10:03 +02:00
kernel ramips: remove hack and use safexcel-eip93ies 2026-04-28 09:44:04 +02:00
libs libsemanage: update to 3.10 2026-04-27 10:50:53 +02:00
network wifi-scripts: ucode: default BIP cipher from wpa_pairwise 2026-05-02 20:34:22 +02:00
system ca-certificates: update to 20260223 2026-04-30 00:17:59 +02:00
utils secilc: update to 3.10 2026-04-27 10:50:54 +02:00
Makefile build: propagate errors when generating apk indexes 2026-02-13 21:17:21 +01:00