[PATCH 02/55] PQC: Indicate the negotiated PQC AKM in IEEE 802.1X Authentication
Ilan Peer
ilan.peer at intel.com
Thu Dec 3 02:44:01 PST 2026
The PQC AKMs are not included in the RSNE of the Beacon frames, and
the same RSNE writer is used for the RSNE in the second IEEE 802.1X
Authentication frame. With a PQC AKM, that RSNE had an empty AKM suite
list, although the specification (See IEEE P802.11bi/D6.0, 12.16.8.3)
requires it to indicate the AKM from the first Authentication frame.
Include the negotiated PQC AKM in the RSNE of the second Authentication
frame and compare the AKMs strictly on the station.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/ap/wpa_auth_ie.c | 29 +++++++++++++++++++++++------
src/common/wpa_common.c | 12 +-----------
src/common/wpa_common.h | 3 +--
wpa_supplicant/sme.c | 4 +---
4 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/src/ap/wpa_auth_ie.c b/src/ap/wpa_auth_ie.c
index 32d1b597d45a..e2c4125058b4 100644
--- a/src/ap/wpa_auth_ie.c
+++ b/src/ap/wpa_auth_ie.c
@@ -123,7 +123,8 @@ static u16 wpa_own_rsn_capab(struct wpa_auth_config *conf,
static u8 * rsne_write_data(u8 *buf, size_t len, u8 *pos, int group,
int pairwise, int key_mgmt, u16 rsn_capab,
const u8 *pmkid, enum mfp_options mfp,
- int group_mgmt_cipher, bool pqc_enabled)
+ int group_mgmt_cipher, bool pqc_enabled,
+ bool pqc_akms)
{
int num_suites, res;
u8 *count;
@@ -310,6 +311,19 @@ static u8 * rsne_write_data(u8 *buf, size_t len, u8 *pos, int group,
num_suites++;
}
#endif /* CONFIG_ENC_ASSOC */
+#ifdef CONFIG_PQC
+ /* Only the negotiated PQC AKM is indicated, see below */
+ if (pqc_akms && (key_mgmt & WPA_KEY_MGMT_PQC_8021X)) {
+ RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_802_1X_PQC);
+ pos += RSN_SELECTOR_LEN;
+ num_suites++;
+ }
+ if (pqc_akms && (key_mgmt & WPA_KEY_MGMT_FT_PQC_8021X)) {
+ RSN_SELECTOR_PUT(pos, RSN_AUTH_KEY_MGMT_FT_802_1X_PQC);
+ pos += RSN_SELECTOR_LEN;
+ num_suites++;
+ }
+#endif /* CONFIG_PQC */
#ifdef CONFIG_RSN_TESTING
if (rsn_testing) {
@@ -419,7 +433,7 @@ int wpa_write_rsn_ie(struct wpa_auth_config *conf, u8 *buf, size_t len,
conf->rsn_pairwise, conf->wpa_key_mgmt,
wpa_own_rsn_capab(conf, conf->ieee80211w), pmkid,
conf->ieee80211w, conf->group_mgmt_cipher,
- conf->pqc_enabled);
+ conf->pqc_enabled, false);
if (!pos)
return -1;
@@ -449,7 +463,8 @@ static int wpa_write_rsne_override(struct wpa_auth_config *conf, u8 *buf,
conf->rsn_override_key_mgmt,
wpa_own_rsn_capab(conf, conf->rsn_override_mfp),
NULL, conf->rsn_override_mfp,
- conf->group_mgmt_cipher, conf->pqc_enabled);
+ conf->group_mgmt_cipher, conf->pqc_enabled,
+ false);
if (!pos)
return -1;
@@ -479,7 +494,8 @@ static int wpa_write_rsne_override_2(struct wpa_auth_config *conf, u8 *buf,
conf->rsn_override_key_mgmt_2,
wpa_own_rsn_capab(conf, conf->rsn_override_mfp_2),
NULL, conf->rsn_override_mfp_2,
- conf->group_mgmt_cipher, conf->pqc_enabled);
+ conf->group_mgmt_cipher, conf->pqc_enabled,
+ false);
if (!pos)
return -1;
@@ -507,7 +523,8 @@ int wpa_write_802_1x_rsne(struct wpa_authenticator *wpa_auth, u8 *buf,
pos = rsne_write_data(buf, len, pos, group_cipher,
pairwise_cipher, akmp,
wpa_own_rsn_capab(conf, conf->ieee80211w),
- pmkid, mfp, group_mgmt_cipher, conf->pqc_enabled);
+ pmkid, mfp, group_mgmt_cipher, conf->pqc_enabled,
+ true);
if (!pos)
return -1;
@@ -543,7 +560,7 @@ int wpa_write_eppke_rsne(const u8 *wpa_ie, size_t wpa_ie_len,
}
pos = rsne_write_data(buf, len, pos, data.group_cipher, pairwise_cipher,
akmp, data.capabilities, pmkid, mfp,
- data.mgmt_group_cipher, false);
+ data.mgmt_group_cipher, false, false);
if (!pos)
return -1;
diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
index e81b6a11f061..8def15e0e69d 100644
--- a/src/common/wpa_common.c
+++ b/src/common/wpa_common.c
@@ -3570,8 +3570,7 @@ int wpa_compare_rsn_ie(int ft_initial_assoc,
* of two RSN IEs.
*/
int wpa_compare_rsne_params(const u8 *rsne1, size_t rsne1_len,
- const u8 *rsne2, size_t rsne2_len,
- bool pqc_sec_prof)
+ const u8 *rsne2, size_t rsne2_len)
{
struct wpa_ie_data rsn1, rsn2;
@@ -3582,15 +3581,6 @@ int wpa_compare_rsne_params(const u8 *rsne1, size_t rsne1_len,
wpa_parse_wpa_ie_rsn(rsne2, rsne2_len, &rsn2) < 0)
return -1;
- if (pqc_sec_prof) {
- /* PQC AKMs are not required to be included in the RSNE, so mask
- * them out from the comparison below.*/
- rsn1.key_mgmt &= ~(WPA_KEY_MGMT_PQC_8021X |
- WPA_KEY_MGMT_FT_PQC_8021X);
- rsn2.key_mgmt &= ~(WPA_KEY_MGMT_PQC_8021X |
- WPA_KEY_MGMT_FT_PQC_8021X);
- }
-
if (rsn1.proto == rsn2.proto &&
rsn1.pairwise_cipher == rsn2.pairwise_cipher &&
rsn1.key_mgmt == rsn2.key_mgmt)
diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
index 0fe8933319b2..d2513846fbb6 100644
--- a/src/common/wpa_common.h
+++ b/src/common/wpa_common.h
@@ -594,8 +594,7 @@ int wpa_compare_rsn_ie(int ft_initial_assoc,
const u8 *ie1, size_t ie1len,
const u8 *ie2, size_t ie2len);
int wpa_compare_rsne_params(const u8 *rsne1, size_t rsne1_len,
- const u8 *rsne2, size_t rsne2_len,
- bool pqc_sec_prof);
+ const u8 *rsne2, size_t rsne2_len);
int wpa_insert_pmkid(u8 *ies, size_t *ies_len, const u8 *pmkid, bool replace);
struct wpa_ft_ies {
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index e55fcafeeb25..e13be816118a 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -4457,9 +4457,7 @@ static int sme_validate_8021x_common_elems(struct wpa_supplicant *wpa_s,
wpa_s->auth_1x->rsne,
wpa_s->auth_1x->rsne_len,
elems->rsn_ie - 2,
- elems->rsn_ie_len + 2,
- wpa_s->sel_security_profile &&
- sec_prof_pqc(wpa_s->sel_security_profile->number)) != 0) {
+ elems->rsn_ie_len + 2) != 0) {
wpa_msg(wpa_s, MSG_INFO, "IEEE 802.1X: RSNE mismatch");
return -1;
}
--
2.55.0
More information about the Hostap
mailing list