[PATCH 15/15] AP: Reject capabilities not allowed by the security profile
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Nov 24 00:53:11 PST 2026
From: Ilan Peer <ilan.peer at intel.com>
IEEE P802.11bn/D2.0, Table 9-bb18 sets the (Re)Association Frame
Encryption Support and PMKSA Caching Privacy Support fields to exactly 1
or 0 for each security profile.
The AP only checked that the fields required to be 1 were set, but did
not check that they were not set for profiles that do not have them set.
Add such check to the Security Profile verification and fail when
there is a mismatch.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/ap/ieee802_11.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 3b0eb61c66..fea5541e99 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -272,6 +272,16 @@ sec_prof_check_rsnx_capab(const struct security_profile_entry *entry,
return false;
}
+ /* Unlike 802.1X in Authentication frames, these are never "0 or 1" */
+ if (!entry->assoc_frame_encrypt &&
+ ieee802_11_rsnx_capab_len(capab, capab_len,
+ WLAN_RSNX_CAPAB_ASSOC_FRAME_ENCRYPTION)) {
+ wpa_printf(MSG_DEBUG,
+ "Security profile=%d: does not allow assoc_frame_encrypt capab in %s",
+ entry->number, src);
+ return false;
+ }
+
if (entry->pmksa_caching_privacy &&
!ieee802_11_rsnx_capab_len(capab, capab_len,
WLAN_RSNX_CAPAB_PMKSA_CACHING_PRIVACY)) {
@@ -281,6 +291,15 @@ sec_prof_check_rsnx_capab(const struct security_profile_entry *entry,
return false;
}
+ if (!entry->pmksa_caching_privacy &&
+ ieee802_11_rsnx_capab_len(capab, capab_len,
+ WLAN_RSNX_CAPAB_PMKSA_CACHING_PRIVACY)) {
+ wpa_printf(MSG_DEBUG,
+ "Security profile=%d: does not allow pmksa_caching_privacy capab in %s",
+ entry->number, src);
+ return false;
+ }
+
return true;
}
--
2.56.1
More information about the Hostap
mailing list