]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mac80211_hwsim: validate number of different channels
authorJohannes Berg <johannes.berg@intel.com>
Mon, 15 Jan 2018 08:32:36 +0000 (09:32 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 15 Jan 2018 08:34:45 +0000 (09:34 +0100)
commit51a1aaa631c90223888d8beac4d649dc11d2ca55
tree752cda62d1295f7e15553e4000461cb8f4142f54
parentb71d856ab536f25eb97c011a351ecddf5518de41
mac80211_hwsim: validate number of different channels

When creating a new radio on the fly, hwsim allows this
to be done with an arbitrary number of channels, but
cfg80211 only supports a limited number of simultaneous
channels, leading to a warning.

Fix this by validating the number - this requires moving
the define for the maximum out to a visible header file.

Reported-by: syzbot+8dd9051ff19940290931@syzkaller.appspotmail.com
Fixes: b59ec8dd4394 ("mac80211_hwsim: fix number of channels in interface combinations")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c
include/net/cfg80211.h
net/wireless/core.h