lkml.org 
[lkml]   [2015]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 52/78] mac80211: free management frame keys when removing station
    Date
    From: Johannes Berg <johannes.berg@intel.com>

    3.12-stable review patch. If anyone has any objections, please let me know.

    ===============

    commit 28a9bc68124c319b2b3dc861e80828a8865fd1ba upstream.

    When writing the code to allow per-station GTKs, I neglected to
    take into account the management frame keys (index 4 and 5) when
    freeing the station and only added code to free the first four
    data frame keys.

    Fix this by iterating the array of keys over the right length.

    Fixes: e31b82136d1a ("cfg80211/mac80211: allow per-station GTKs")
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    ---
    net/mac80211/key.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/net/mac80211/key.c b/net/mac80211/key.c
    index 620677e897bd..23dfd244c892 100644
    --- a/net/mac80211/key.c
    +++ b/net/mac80211/key.c
    @@ -615,7 +615,7 @@ void ieee80211_free_sta_keys(struct ieee80211_local *local,
    int i;

    mutex_lock(&local->key_mtx);
    - for (i = 0; i < NUM_DEFAULT_KEYS; i++) {
    + for (i = 0; i < ARRAY_SIZE(sta->gtk); i++) {
    key = key_mtx_dereference(local, sta->gtk[i]);
    if (!key)
    continue;
    --
    2.2.1


    \
     
     \ /
      Last update: 2015-01-09 12:01    [W:4.340 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site