From: Jouni Malinen <jouni@qca.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 1/6] cfg80211: Fix BIP (AES-CMAC) cipher validation
Date: Sat, 24 Jan 2015 19:52:04 +0200 [thread overview]
Message-ID: <1422121929-18238-1-git-send-email-jouni@qca.qualcomm.com> (raw)
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
next reply other threads:[~2015-01-24 17:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-24 17:52 Jouni Malinen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422121929-18238-1-git-send-email-jouni@qca.qualcomm.com \
--to=jouni@qca.qualcomm.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).