diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-09-13 15:53:55 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-09-13 20:19:27 +0200 |
commit | ad5987b47e96a0fb6d13fea250e936aed000093c (patch) | |
tree | c082456e4de6f8d0e7a2b6d6a50f6aaaa76cc2de /net | |
parent | 5df20f2141eadb5430caaad20eceac61cfe0f139 (diff) |
nl80211: validate number of probe response CSA counters
Due to an apparent copy/paste bug, the number of counters for the
beacon configuration were checked twice, instead of checking the
number of probe response counters. Fix this to check the number of
probe response counters before parsing those.
Cc: stable@vger.kernel.org
Fixes: 9a774c78e211 ("cfg80211: Support multiple CSA counters")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/nl80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f02653a08993..4809f4d2cdcc 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -6978,7 +6978,7 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info) params.n_counter_offsets_presp = len / sizeof(u16); if (rdev->wiphy.max_num_csa_counters && - (params.n_counter_offsets_beacon > + (params.n_counter_offsets_presp > rdev->wiphy.max_num_csa_counters)) return -EINVAL; |