[kernel] r18769 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series

Ben Hutchings benh at alioth.debian.org
Sat Mar 3 18:39:10 UTC 2012


Author: benh
Date: Sat Mar  3 18:39:09 2012
New Revision: 18769

Log:
iwlwifi: fix key removal (Closes: #651199)

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/all/iwlwifi-fix-key-removal.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/base

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Sat Mar  3 18:18:09 2012	(r18768)
+++ dists/sid/linux-2.6/debian/changelog	Sat Mar  3 18:39:09 2012	(r18769)
@@ -27,6 +27,7 @@
       (sysctl: fs.protected_hardlinks) (Closes: #609455)
     The precise restrictions are specified in Documentation/sysctl/fs.txt in
     the linux-doc-3.2 and linux-source-3.2 packages.
+  * iwlwifi: fix key removal (Closes: #651199)
 
  -- Bastian Blank <waldi at debian.org>  Thu, 01 Mar 2012 11:47:17 +0100
 

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/iwlwifi-fix-key-removal.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/iwlwifi-fix-key-removal.patch	Sat Mar  3 18:39:09 2012	(r18769)
@@ -0,0 +1,57 @@
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Fri, 17 Feb 2012 09:47:14 -0800
+Subject: [PATCH] iwlwifi: fix key removal
+
+commit 5dcbf480473f6c3f06ad2426b7517038a2a18911 upstream.
+
+When trying to remove a key, we always send key
+flags just setting the key type, not including
+the multicast flag and the key ID. As a result,
+whenever any key was removed, the unicast key 0
+would be removed, causing a complete connection
+loss after the second rekey (the first doesn't
+cause a key removal). Fix the key removal code
+to include the key ID and multicast flag, thus
+removing the correct key.
+
+Cc: stable at vger.kernel.org
+Reported-by: Alexander Schnaidt <alex.schnaidt at googlemail.com>
+Tested-by: Alexander Schnaidt <alex.schnaidt at googlemail.com>
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+Signed-off-by: Wey-Yi Guy <wey-yi.w.guy at intel.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/iwlwifi/iwl-agn-sta.c |   10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+index 7353826..e483cfa 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+@@ -1187,6 +1187,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
+ 	unsigned long flags;
+ 	struct iwl_addsta_cmd sta_cmd;
+ 	u8 sta_id = iwlagn_key_sta_id(priv, ctx->vif, sta);
++	__le16 key_flags;
+ 
+ 	/* if station isn't there, neither is the key */
+ 	if (sta_id == IWL_INVALID_STATION)
+@@ -1212,7 +1213,14 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
+ 		IWL_ERR(priv, "offset %d not used in uCode key table.\n",
+ 			keyconf->hw_key_idx);
+ 
+-	sta_cmd.key.key_flags = STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID;
++	key_flags = cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
++	key_flags |= STA_KEY_FLG_MAP_KEY_MSK | STA_KEY_FLG_NO_ENC |
++		     STA_KEY_FLG_INVALID;
++
++	if (!(keyconf->flags & IEEE80211_KEY_FLAG_PAIRWISE))
++		key_flags |= STA_KEY_MULTICAST_MSK;
++
++	sta_cmd.key.key_flags = key_flags;
+ 	sta_cmd.key.key_offset = WEP_INVALID_OFFSET;
+ 	sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK;
+ 	sta_cmd.mode = STA_CONTROL_MODIFY_MSK;
+-- 
+1.7.9.1
+

Modified: dists/sid/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/base	Sat Mar  3 18:18:09 2012	(r18768)
+++ dists/sid/linux-2.6/debian/patches/series/base	Sat Mar  3 18:39:09 2012	(r18769)
@@ -86,3 +86,4 @@
 + features/all/fs-hardlink-creation-restrictions.patch
 + features/all/fs-hardlink-creation-restrictions-fix.patch
 + features/all/fs-hardlink-creation-restriction-cleanup.patch
++ bugfix/all/iwlwifi-fix-key-removal.patch



More information about the Kernel-svn-changes mailing list