Skip to content

Commit d58d71c

Browse files
SilverPlate3Sasha Levin
authored andcommitted
wifi: mac80211: bounds-check link_id in ieee80211_ml_reconfiguration
commit 162d331 upstream. link_id is taken from the ML Reconfiguration element (control & 0x000f), so it can be 0..15. link_removal_timeout[] has IEEE80211_MLD_MAX_NUM_LINKS (15) elements, so index 15 is out-of-bounds. Skip subelements with link_id >= IEEE80211_MLD_MAX_NUM_LINKS to avoid a stack out-of-bounds write. Fixes: 8eb8dd2 ("wifi: mac80211: Support link removal using Reconfiguration ML element") Reported-by: Ariel Silver <arielsilver77@gmail.com> Signed-off-by: Ariel Silver <arielsilver77@gmail.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260220101129.1202657-1-Ariel.Silver@cybereason.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent cd2f529 commit d58d71c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/mac80211/mlme.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6975,6 +6975,9 @@ static void ieee80211_ml_reconfiguration(struct ieee80211_sub_if_data *sdata,
69756975
control = le16_to_cpu(prof->control);
69766976
link_id = control & IEEE80211_MLE_STA_RECONF_CONTROL_LINK_ID;
69776977

6978+
if (link_id >= IEEE80211_MLD_MAX_NUM_LINKS)
6979+
continue;
6980+
69786981
removed_links |= BIT(link_id);
69796982

69806983
/* the MAC address should not be included, but handle it */

0 commit comments

Comments
 (0)