From fcef598ea27ae15d00c6441f517885e4c316c645 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 8 Jun 2020 21:40:56 +0300 Subject: [PATCH] Do not try to connect with zero-length SSID It was possible to find a BSS to local network profile match for a BSS entry that has no known SSID when going through some of the SSID wildcard cases. At leas the OWE transition mode case without BSSID match could result in hitting this. Zero-length SSID (i.e., wildcard SSID) is not valid in (Re)Association Request frame, so such an association will fail. Skip such a BSS to avoid known-to-be-failing association attempts. Signed-off-by: Jouni Malinen --- wpa_supplicant/events.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 86eef1b81..b93c62c8e 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1451,6 +1451,13 @@ skip_assoc_disallow: } #endif /* CONFIG_SAE_PK */ + if (bss->ssid_len == 0) { + if (debug_print) + wpa_dbg(wpa_s, MSG_DEBUG, + " skip - no SSID known for the BSS"); + return false; + } + /* Matching configuration found */ return true; }