All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nl80211: validate number of probe response CSA counters
@ 2016-09-13 13:56 Johannes Berg
  2016-09-15  6:08 ` Coelho, Luciano
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2016-09-13 13:56 UTC (permalink / raw)
  To: linux-wireless; +Cc: Andrei Otcheretianski, Luca Coelho, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

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.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/wireless/nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ef234d2fd854..a65c94f202f8 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6998,7 +6998,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;
 
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-15  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13 13:56 [PATCH] nl80211: validate number of probe response CSA counters Johannes Berg
2016-09-15  6:08 ` Coelho, Luciano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.