[PATCH 02/10] MLD: Ensure link_bssid array has space for sentinel

benjamin at sipsolutions.net benjamin at sipsolutions.net
Fri Jun 14 01:13:43 PDT 2024


From: Benjamin Berg <benjamin.berg at intel.com>

The consumer of the link_bssid array assumes it is a NULL terminated
array of BSSIDs. As such, add one to the maximum number of links to
ensure that there is always a sentinel value.

Fixes: 5af986c75af4 ("MLD: Also mark links as failed after association failure")
Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
---
 wpa_supplicant/events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 656bab5c44..68222bb638 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -5620,7 +5620,7 @@ static void wpas_event_assoc_reject(struct wpa_supplicant *wpa_s,
 	const u8 *bssid = data->assoc_reject.bssid;
 	struct ieee802_11_elems elems;
 	struct ml_sta_link_info ml_info[MAX_NUM_MLD_LINKS];
-	const u8 *link_bssids[MAX_NUM_MLD_LINKS];
+	const u8 *link_bssids[MAX_NUM_MLD_LINKS + 1];
 #ifdef CONFIG_MBO
 	struct wpa_bss *reject_bss;
 #endif /* CONFIG_MBO */
-- 
2.45.1




More information about the Hostap mailing list