[PATCH 14/15] wpa_supplicant: Follow the security profile for assoc encryption

Andrei Otcheretianski andrei.otcheretianski at intel.com
Tue Nov 24 00:53:10 PST 2026


From: Ilan Peer <ilan.peer at intel.com>

The (Re)Association Frame Encryption Support and PMKSA Caching
Privacy Support fields of the RSNXE are set to either 0 or 1
according to the Security Profile definitions in Table 9-bb18
in Draft IEEE P802.11bn/D2.0.

However, the wpa_supplicant configured them based on the AP
capabilities and the network configuration, so they were set
with Security Profiles that do not indicate them, e.g., SAE (9).

Clear association frame encryption and set PMKSA caching privacy based
on the selected security profile.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 wpa_supplicant/wpa_supplicant.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 389c6c4340..a860745847 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2930,6 +2930,18 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
 	}
 no_valid_sp:
 
+	/* Table 9-bb18 sets these to exactly 0 or 1 for each profile */
+	if (wpa_s->sel_security_profile) {
+		if (!wpa_s->sel_security_profile->assoc_frame_encrypt)
+			wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_ASSOC_ENC,
+					 false);
+#ifdef CONFIG_PMKSA_PRIVACY
+		wpa_sm_set_param(
+			wpa_s->wpa, WPA_PARAM_PMKSA_CACHING_PRIVACY,
+			wpa_s->sel_security_profile->pmksa_caching_privacy);
+#endif /* CONFIG_PMKSA_PRIVACY */
+	}
+
 	if (!skip_default_rsne) {
 		if (wpa_sm_set_assoc_wpa_ie_default(wpa_s->wpa, wpa_ie,
 						    wpa_ie_len)) {
-- 
2.56.1




More information about the Hostap mailing list