[PATCH 49/55] RSN: Parse PQC Parameter elements in EAPOL-Key Key Data
Ilan Peer
ilan.peer at intel.com
Thu Dec 3 02:44:48 PST 2026
With the PQC AKMs, EAPOL-Key msg 1/4 and 2/4 of a PTK rekey carry a PQC
Parameter element, which is an Extended Length element. Parse Extended
Length elements in the Key Data and record the PQC Parameter element
and the number of such elements.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/common/wpa_common.c | 21 +++++++++++++++++++++
src/common/wpa_common.h | 3 +++
2 files changed, 24 insertions(+)
diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
index a22c7a3f67de..8d54beae4b50 100644
--- a/src/common/wpa_common.c
+++ b/src/common/wpa_common.c
@@ -4635,6 +4635,27 @@ int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie)
/* Ignore padding */
break;
}
+
+ if (pos[0] == WLAN_EID_EXT_LENGTH) {
+ if (end - pos < 5 ||
+ WPA_GET_LE16(pos + 3) > end - pos - 5) {
+ wpa_printf(MSG_DEBUG,
+ "WPA: Truncated Extended Length element in EAPOL-Key Key Data");
+ ret = -1;
+ break;
+ }
+
+ dlen = 5 + WPA_GET_LE16(pos + 3);
+ if (WPA_GET_LE16(pos + 1) ==
+ WLAN_EID_EXT_LEN_PQC_PARAMETER) {
+ ie->pqc_parameter = pos + 5;
+ ie->pqc_parameter_len = dlen - 5;
+ ie->num_pqc_parameter++;
+ }
+
+ continue;
+ }
+
dlen = 2 + pos[1];
if ((int) dlen > end - pos) {
wpa_printf(MSG_DEBUG,
diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
index af621e1a65e7..00f98c03d9f2 100644
--- a/src/common/wpa_common.h
+++ b/src/common/wpa_common.h
@@ -776,6 +776,9 @@ struct wpa_eapol_ie_parse {
size_t nan_key_lifetime_len;
const u8 *security_profile;
size_t security_profile_len;
+ const u8 *pqc_parameter;
+ size_t pqc_parameter_len;
+ unsigned int num_pqc_parameter;
u16 valid_mlo_gtks; /* bitmap of valid link GTK KDEs */
const u8 *mlo_gtk[MAX_NUM_MLD_LINKS];
size_t mlo_gtk_len[MAX_NUM_MLD_LINKS];
--
2.55.0
More information about the Hostap
mailing list