All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] cfg80211: disallow shared key authentication with key index 4
@ 2016-09-13 14:44 Johannes Berg
  2016-09-13 14:44 ` [PATCH 2/6] nl80211: fix connect keys range check Johannes Berg
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Johannes Berg @ 2016-09-13 14:44 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

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

Key index 4 can only be used for an IGTK, so the range checks
for shared key authentication should treat 4 as an error, fix
that in the code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/wireless/mlme.c    | 2 +-
 net/wireless/nl80211.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index c284d883c349..d6abb0704db5 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -222,7 +222,7 @@ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
 	ASSERT_WDEV_LOCK(wdev);
 
 	if (auth_type == NL80211_AUTHTYPE_SHARED_KEY)
-		if (!key || !key_len || key_idx < 0 || key_idx > 4)
+		if (!key || !key_len || key_idx < 0 || key_idx > 3)
 			return -EINVAL;
 
 	if (wdev->current_bss &&
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 83c6445ebf33..c96e22b906af 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7388,7 +7388,7 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info)
 		    (key.p.cipher != WLAN_CIPHER_SUITE_WEP104 ||
 		     key.p.key_len != WLAN_KEY_LEN_WEP104))
 			return -EINVAL;
-		if (key.idx > 4)
+		if (key.idx > 3)
 			return -EINVAL;
 	} else {
 		key.p.key_len = 0;
-- 
2.8.1

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

end of thread, other threads:[~2016-09-28 21:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13 14:44 [PATCH 1/6] cfg80211: disallow shared key authentication with key index 4 Johannes Berg
2016-09-13 14:44 ` [PATCH 2/6] nl80211: fix connect keys range check Johannes Berg
2016-09-13 14:44 ` [PATCH 3/6] nl80211: only allow WEP keys during connect command Johannes Berg
2016-09-13 14:44 ` [PATCH 4/6] cfg80211: wext: only allow WEP keys to be configured before connected Johannes Berg
2016-09-13 14:44 ` [PATCH 5/6] cfg80211: validate key index better Johannes Berg
2016-09-13 14:44 ` [PATCH 6/6] cfg80211: reduce connect key caching struct size Johannes Berg
2016-09-28 20:58   ` Jouni Malinen
2016-09-28 21:57     ` Johannes Berg

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.