]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PASN: Derive KDK on AP only when both ends support SecureLTF
authorSai Pratyusha Magam <quic_smagam@quicinc.com>
Thu, 9 May 2024 09:46:29 +0000 (15:16 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 11 Jul 2024 19:14:50 +0000 (22:14 +0300)
On the AP responder side, KDK was derived if the driver advertises
WPA_DRIVER_FLAGS2_SEC_LTF_AP. That is not correct, i.e., this needs to
also depend on the initiator indicating support for this in the RSNXE of
PASN authentication frame 1.

Signed-off-by: Sai Pratyusha Magam <quic_smagam@quicinc.com>
src/ap/ieee802_11.c

index 7592ba998b57f0a9cde56178e03e52d39f503c91..2d361fc59e397b4bad8898723f0086fb5ba607d4 100644 (file)
@@ -2701,6 +2701,14 @@ static void hapd_pasn_update_params(struct hostapd_data *hapd,
        pasn_set_akmp(pasn, rsn_data.key_mgmt);
        pasn_set_cipher(pasn, rsn_data.pairwise_cipher);
 
+       if (pasn->derive_kdk &&
+           !ieee802_11_rsnx_capab_len(elems.rsnxe, elems.rsnxe_len,
+                                      WLAN_RSNX_CAPAB_SECURE_LTF))
+               pasn_disable_kdk_derivation(pasn);
+#ifdef CONFIG_TESTING_OPTIONS
+       if (hapd->conf->force_kdk_derivation)
+               pasn_enable_kdk_derivation(pasn);
+#endif /* CONFIG_TESTING_OPTIONS */
        akmp = pasn_get_akmp(pasn);
 
        if (wpa_key_mgmt_ft(akmp) && rsn_data.num_pmkid) {