[PATCH 09/15] tests: Extended RSN Capabilities mismatch in STA Security Profile element

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


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

Verify that the AP rejects EPPKE authentication when the Extended RSN
Capabilities field of the STA's Security Profile element lacks a
capability required by the indicated profile.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 tests/hwsim/test_security_profiles.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tests/hwsim/test_security_profiles.py b/tests/hwsim/test_security_profiles.py
index 7db1921230..fa31ce68f0 100644
--- a/tests/hwsim/test_security_profiles.py
+++ b/tests/hwsim/test_security_profiles.py
@@ -575,6 +575,28 @@ def test_security_profile_0_assoc_missing(dev, apdev):
         dev[0].set("sec_prof_override_assoc", "NULL")
         sta_cleanup(dev[0])
 
+def test_security_profile_0_auth_ext_rsn_capab_mismatch(dev, apdev):
+    """Security Profile 0 - Extended RSN Capabilities in the element do not match the profile"""
+    check_eppke_capab(dev[0])
+    hapd = start_eppke_ap_security_profile_0(apdev[0])
+
+    try:
+        enable_sta_security_profiles(dev[0], 0)
+        # Profile 0 with an empty Extended RSN Capabilities field
+        dev[0].set("sec_prof_override_auth", "ff05a200010100")
+        dev[0].connect("sp0-eppke", scan_freq="2412", key_mgmt="EPPKE",
+                       ieee80211w="2", beacon_prot="1",
+                       pairwise="GCMP-256", group="GCMP-256",
+                       group_mgmt="BIP-GMAC-256", pmksa_privacy="1",
+                       wait_connect=False)
+        ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=5)
+        dev[0].request("REMOVE_NETWORK all")
+        if ev is not None:
+            raise Exception("Connected with mismatching Extended RSN Capabilities")
+    finally:
+        dev[0].set("sec_prof_override_auth", "NULL")
+        sta_cleanup(dev[0])
+
 def run_sp9_sp_mlo_m3(dev, apdev, sp_elem, reason):
     with HWSimRadio(use_mlo=True) as (hapd_radio, hapd_iface), \
          HWSimRadio(use_mlo=True) as (wpas_radio, wpas_iface):
-- 
2.56.1




More information about the Hostap mailing list