]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MLD: Ensure link_bssid array has space for sentinel
authorBenjamin Berg <benjamin.berg@intel.com>
Fri, 14 Jun 2024 08:13:43 +0000 (10:13 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 11 Jul 2024 15:53:59 +0000 (18:53 +0300)
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@intel.com>
wpa_supplicant/events.c

index 952816db23b4f2e6661ebdd6d7b461f265cc39d7..d45e7925db5cfe7f42d7eed3aeecd21f1f8b1b96 100644 (file)
@@ -5637,7 +5637,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 */