mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
wifi: mac80211: check basic rates validity in sta_link_apply_parameters
commit16ee3ea8fa
upstream. When userspace sets supported rates for a new station via NL80211_CMD_NEW_STATION, it might send a list that's empty or contains only invalid values. Currently, we process these values in sta_link_apply_parameters() without checking the result of ieee80211_parse_bitrates(), which can lead to an empty rates bitmap. A similar issue was addressed for NL80211_CMD_SET_BSS in commitce04abc3fc
("wifi: mac80211: check basic rates validity"). This patch applies the same approach in sta_link_apply_parameters() for NL80211_CMD_NEW_STATION, ensuring there is at least one valid rate by inspecting the result of ieee80211_parse_bitrates(). Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes:b95eb7f0ee
("wifi: cfg80211/mac80211: separate link params from station params") Signed-off-by: Mikhail Lobanov <m.lobanov@rosa.ru> Link: https://patch.msgid.link/20250317103139.17625-1-m.lobanov@rosa.ru Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Hanne-Lotta Mäenpää <hannelotta@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
20d03830f0
commit
110821e5de
|
@ -1879,12 +1879,12 @@ static int sta_link_apply_parameters(struct ieee80211_local *local,
|
|||
}
|
||||
|
||||
if (params->supported_rates &&
|
||||
params->supported_rates_len) {
|
||||
ieee80211_parse_bitrates(link->conf->chanreq.oper.width,
|
||||
sband, params->supported_rates,
|
||||
params->supported_rates_len,
|
||||
&link_sta->pub->supp_rates[sband->band]);
|
||||
}
|
||||
params->supported_rates_len &&
|
||||
!ieee80211_parse_bitrates(link->conf->chanreq.oper.width,
|
||||
sband, params->supported_rates,
|
||||
params->supported_rates_len,
|
||||
&link_sta->pub->supp_rates[sband->band]))
|
||||
return -EINVAL;
|
||||
|
||||
if (params->ht_capa)
|
||||
ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
|
||||
|
|
Loading…
Reference in New Issue
Block a user