Skip to content

Commit

Permalink
wifi: mac80211: prohibit deactivating all links
Browse files Browse the repository at this point in the history
In the internal API this calls this is a WARN_ON, but that
should remain since internally we want to know about bugs
that may cause this. Prevent deactivating all links in the
debugfs write directly.

Reported-by: syzbot+0c5d8e65f23569a8ffec@syzkaller.appspotmail.com
Fixes: 3d90110 ("wifi: mac80211: implement link switching")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20241230091408.505bd125c35a.Ic3c1f9572b980a952a444cad62b09b9c6721732b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
jmberg-intel committed Jan 13, 2025
1 parent 11cc69a commit 7553477
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/debugfs_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ static ssize_t ieee80211_if_parse_active_links(struct ieee80211_sub_if_data *sda
{
u16 active_links;

if (kstrtou16(buf, 0, &active_links))
if (kstrtou16(buf, 0, &active_links) || !active_links)
return -EINVAL;

return ieee80211_set_active_links(&sdata->vif, active_links) ?: buflen;
Expand Down

0 comments on commit 7553477

Please sign in to comment.