All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] cfg80211: Fix BIP (AES-CMAC) cipher validation
@ 2015-01-24 17:52 Jouni Malinen
  2015-01-24 17:52 ` [PATCH 2/6] cfg80211: Add new GCMP, CCMP-256, BIP-GMAC, BIP-CMAC-256 ciphers Jouni Malinen
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Jouni Malinen @ 2015-01-24 17:52 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

This cipher can be used only as a group management frame cipher and as
such, there is no point in validating that it is not used with non-zero
key-index. Instead, verify that it is not used as a pairwise cipher
regardless of the key index.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
---
 net/wireless/util.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index 3535e8a..f608ba0 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -236,8 +236,11 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev,
 	 */
 	if (pairwise && key_idx &&
 	    ((params->cipher == WLAN_CIPHER_SUITE_TKIP) ||
-	     (params->cipher == WLAN_CIPHER_SUITE_CCMP) ||
-	     (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC)))
+	     (params->cipher == WLAN_CIPHER_SUITE_CCMP)))
+		return -EINVAL;
+
+	/* Disallow BIP (group-only) cipher as pairwise cipher */
+	if (pairwise && params->cipher == WLAN_CIPHER_SUITE_AES_CMAC)
 		return -EINVAL;
 
 	switch (params->cipher) {
-- 
1.9.1


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

end of thread, other threads:[~2015-01-27 10:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-24 17:52 [PATCH 1/6] cfg80211: Fix BIP (AES-CMAC) cipher validation Jouni Malinen
2015-01-24 17:52 ` [PATCH 2/6] cfg80211: Add new GCMP, CCMP-256, BIP-GMAC, BIP-CMAC-256 ciphers Jouni Malinen
2015-01-24 17:52 ` [PATCH 3/6] mac80111: Add GCMP and GCMP-256 ciphers Jouni Malinen
2015-01-24 17:52 ` [PATCH 4/6] mac80111: Add CCMP-256 cipher Jouni Malinen
2015-01-27  9:16   ` Johannes Berg
2015-01-24 17:52 ` [PATCH 5/6] mac80111: Add BIP-CMAC-256 cipher Jouni Malinen
2015-01-24 17:52 ` [PATCH 6/6] mac80111: Add BIP-GMAC-128 and BIP-GMAC-256 ciphers Jouni Malinen
2015-01-27 10:13 ` [PATCH 1/6] cfg80211: Fix BIP (AES-CMAC) cipher validation 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.