Skip to contentSkip to conversation

scan: remove force_default_sae_group from scan_bss

PATCH In review James Prestwood 2 participants 4 messages May 13, 2024 – May 14, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 scan: remove force_default_sae_group from scan_bss

This was added to support a single buggy AP model that failed to negotiate the SAE group correctly. This may still be a problem but since then the [Network].UseDefaultEccGroup option has been added which accomplishes the same thing.

Remove the special handling for this specific OUI and rely on the user setting the new option if they have problems.

---
 src/network.c | 3 +--
 src/scan.c    | 3 ---
 src/scan.h    | 1 -
 3 files changed, 1 insertion(+), 6 deletions(-)
src/network.c +1 -2
index 7b996f51..09099fac 100644
@@ -556,8 +556,7 @@ int network_handshake_setup(struct network *network, struct scan_bss *bss,
 		handshake_state_set_protocol_version(hs, eapol_proto_version);
 	}
 
-	hs->force_default_ecc_group = network->force_default_ecc_group ||
-						bss->force_default_sae_group;
+	hs->force_default_ecc_group = network->force_default_ecc_group;
 
 	/*
 	 * The randomization options in the provisioning file are dependent on
src/scan.c +0 -3
index f48ffdef..d3f0ad31 100644
@@ -1242,9 +1242,6 @@ static void scan_parse_vendor_specific(struct scan_bss *bss, const void *data,
 		bss->cost_flags = cost_flags;
 		return;
 	}
-
-	if (is_ie_default_sae_group_oui(data, len))
-		bss->force_default_sae_group = true;
 }
 
 /*
src/scan.h +0 -1
index 65caf41c..516b6152 100644
@@ -82,7 +82,6 @@ struct scan_bss {
 	bool vht_capable : 1;
 	bool anqp_capable : 1;
 	bool hs20_capable : 1;
-	bool force_default_sae_group : 1;
 	bool proxy_arp : 1;
 	bool hs20_dgaf_disable : 1;
 	uint8_t cost_level : 3;
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/3 ie: remove is_ie_default_sae_group_oui

This is no longer used and instead a generic option was added rather than referencing a static OUI list.

---
 src/ie.c | 26 --------------------------
 src/ie.h |  1 -
 2 files changed, 27 deletions(-)
src/ie.c +0 -26
index 86f33f2a..b180291a 100644
@@ -1509,32 +1509,6 @@ bool is_ie_wpa_ie(const uint8_t *data, uint8_t len)
 	return false;
 }
 
-/*
- * List of vendor OUIs (prefixed with a length byte) which require forcing
- * the default SAE group.
- */
-static const uint8_t use_default_sae_group_ouis[][5] = {
-	{ 0x04, 0xf4, 0xf5, 0xe8, 0x05 },
-};
-
-bool is_ie_default_sae_group_oui(const uint8_t *data, uint16_t len)
-{
-	unsigned int i;
-	const uint8_t *oui;
-
-	for (i = 0; i < L_ARRAY_SIZE(use_default_sae_group_ouis); i++) {
-		oui = use_default_sae_group_ouis[i];
-
-		if (len < oui[0])
-			continue;
-
-		if (!memcmp(oui + 1, data, oui[0]))
-			return true;
-	}
-
-	return false;
-}
-
 int ie_parse_wpa(struct ie_tlv_iter *iter, struct ie_rsn_info *out_info)
 {
 	const uint8_t *data = iter->data;
src/ie.h +0 -1
index 9ada64bf..024eacaa 100644
@@ -634,7 +634,6 @@ int ie_parse_wpa_from_data(const uint8_t *data, size_t len,
 						struct ie_rsn_info *info);
 bool is_ie_wfa_ie(const uint8_t *data, uint8_t len, uint8_t oi_type);
 bool is_ie_wpa_ie(const uint8_t *data, uint8_t len);
-bool is_ie_default_sae_group_oui(const uint8_t *data, uint16_t len);
 
 bool ie_build_wpa(const struct ie_rsn_info *info, uint8_t *to);
 
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/3 auto-t: remove default group SAE test for specific OUI

In reply to James Prestwood

There are already tests for UseDefaultEccGroup and this test is not longer valid as the static OUI list has been removed.

---
 autotests/testSAE/connection_test.py         |  7 -------
 autotests/testSAE/hw.conf                    |  3 +--
 autotests/testSAE/ssidSAE-default-group.conf | 12 ------------
 3 files changed, 1 insertion(+), 21 deletions(-)
 delete mode 100644 autotests/testSAE/ssidSAE-default-group.conf
autotests/testSAE/connection_test.py +0 -7
index f7776385..107daa55 100644
@@ -52,12 +52,6 @@ class Test(unittest.TestCase):
         self.hostapd.wait_for_event("AP-ENABLED")
         self.validate_connection(self.wd, "ssidSAE", self.hostapd, 19)
 
-    def test_SAE_force_group_19(self):
-        # Vendor data from APs which require group 19 be used first
-        self.hostapd.reload()
-        self.hostapd.wait_for_event("AP-ENABLED")
-        self.validate_connection(self.wd, "ssidSAE-default-group", self.hostapd_defgroup, 19)
-
     def test_SAE_Group20(self):
         self.hostapd.set_value('sae_groups', '20')
         self.hostapd.reload()
@@ -88,7 +82,6 @@ class Test(unittest.TestCase):
     def setUpClass(cls):
         cls.hostapd = HostapdCLI(config='ssidSAE.conf')
         cls.hostapd_h2e = HostapdCLI(config='ssidSAE-H2E.conf')
-        cls.hostapd_defgroup = HostapdCLI(config='ssidSAE-default-group.conf')
 
     @classmethod
     def tearDownClass(cls):
autotests/testSAE/hw.conf +1 -2
index 127bbb31..cc0836b7 100644
@@ -1,9 +1,8 @@
 [SETUP]
-num_radios=4
+num_radios=3
 start_iwd=0
 hwsim_medium=yes
 
 [HOSTAPD]
 rad0=ssidSAE.conf
 rad1=ssidSAE-H2E.conf
-rad2=ssidSAE-default-group.conf
autotests/testSAE/ssidSAE-default-group.conf deleted +0 -12
deleted file mode 100644
index 752e9c7b..00000000
@@ -1,12 +0,0 @@
-hw_mode=g
-channel=1
-ssid=ssidSAE-default-group
-
-wpa=2
-wpa_key_mgmt=SAE
-wpa_pairwise=CCMP
-sae_password=secret123
-sae_groups=19
-ieee80211w=2
-sae_pwe=0
-vendor_elements=dd0cf4f5e8050500000000000000
Signature · 1 line
2.34.1
#3 lore raw
In reply to James Prestwood

Hi James,

Quoted 5 lines · James Prestwood

This was added to support a single buggy AP model that failed to negotiate the SAE group correctly. This may still be a problem but since then the [Network].UseDefaultEccGroup option has been added which accomplishes the same thing.

Quoted 8 lines

Remove the special handling for this specific OUI and rely on the user setting the new option if they have problems.

---
  src/network.c | 3 +--
  src/scan.c    | 3 ---
  src/scan.h    | 1 -
  3 files changed, 1 insertion(+), 6 deletions(-)

All applied, thanks.

Regards,
-Denis