[PATCH 13/15] tests: Security profile with modified RSNE/RSNXE in EPPKE auth
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Nov 24 00:53:09 PST 2026
From: Ilan Peer <ilan.peer at intel.com>
Verify that the AP rejects EPPKE authentication when the RSNE lacks
MFPR or the RSNXE lacks association frame encryption support required
by the indicated security profile.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
tests/hwsim/test_security_profiles.py | 31 +++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/tests/hwsim/test_security_profiles.py b/tests/hwsim/test_security_profiles.py
index fa31ce68f0..05dfa0a0c8 100644
--- a/tests/hwsim/test_security_profiles.py
+++ b/tests/hwsim/test_security_profiles.py
@@ -597,6 +597,37 @@ def test_security_profile_0_auth_ext_rsn_capab_mismatch(dev, apdev):
dev[0].set("sec_prof_override_auth", "NULL")
sta_cleanup(dev[0])
+def run_security_profile_0_auth_override(dev, apdev, field, value):
+ check_eppke_capab(dev[0])
+ hapd = start_eppke_ap_security_profile_0(apdev[0])
+
+ try:
+ enable_sta_security_profiles(dev[0], 0)
+ dev[0].set(field, value)
+ 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 despite %s=%s" % (field, value))
+ finally:
+ dev[0].set(field, "NULL")
+ sta_cleanup(dev[0])
+
+def test_security_profile_0_auth_rsne_no_mfpr(dev, apdev):
+ """Security Profile 0 - EPPKE Authentication frame RSNE without MFPR"""
+ run_security_profile_0_auth_override(
+ dev, apdev, "rsne_override_auth",
+ "301a0100000fac090100000fac090100000fac1d8c000000000fac0c")
+
+def test_security_profile_0_auth_rsnxe_no_assoc_enc(dev, apdev):
+ """Security Profile 0 - EPPKE Authentication frame RSNXE without association frame encryption"""
+ run_security_profile_0_auth_override(dev, apdev, "rsnxe_override_auth",
+ "f40403000420")
+
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