aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-05 10:26:26 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-10-05 10:26:26 +0000
commitcd80931e0316e3eb9499c5ca6be079abb5370378 (patch)
tree5c610fbeb6b8a3e7f17624c5a5ede7ba653afc04 /package/network
parentb5529ed26bfe7c55b03036659db4d352d93e4eab (diff)
downloadupstream-cd80931e0316e3eb9499c5ca6be079abb5370378.tar.gz
upstream-cd80931e0316e3eb9499c5ca6be079abb5370378.tar.bz2
upstream-cd80931e0316e3eb9499c5ca6be079abb5370378.zip
hostapd: merge an upstream patch for pmksa cache
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42762
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/hostapd/patches/001-fix_pmksa_cache.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/001-fix_pmksa_cache.patch b/package/network/services/hostapd/patches/001-fix_pmksa_cache.patch
new file mode 100644
index 0000000000..76a3968857
--- /dev/null
+++ b/package/network/services/hostapd/patches/001-fix_pmksa_cache.patch
@@ -0,0 +1,32 @@
+From 9c829900bb01d6fb22e78ba78195c78de39f64b9 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sat, 04 Oct 2014 19:11:00 +0000
+Subject: Fix authenticator OKC fetch from PMKSA cache to avoid infinite loop
+
+If the first entry in the PMKSA cache did not match the station's MAC
+address, an infinite loop could be reached in pmksa_cache_get_okc() when
+trying to find a PMKSA cache entry for opportunistic key caching cases.
+This would only happen if OKC is enabled (okc=1 included in the
+configuration file).
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+--- a/src/ap/pmksa_cache_auth.c
++++ b/src/ap/pmksa_cache_auth.c
+@@ -394,15 +394,13 @@ struct rsn_pmksa_cache_entry * pmksa_cac
+ struct rsn_pmksa_cache_entry *entry;
+ u8 new_pmkid[PMKID_LEN];
+
+- entry = pmksa->pmksa;
+- while (entry) {
++ for (entry = pmksa->pmksa; entry; entry = entry->next) {
+ if (os_memcmp(entry->spa, spa, ETH_ALEN) != 0)
+ continue;
+ rsn_pmkid(entry->pmk, entry->pmk_len, aa, spa, new_pmkid,
+ wpa_key_mgmt_sha256(entry->akmp));
+ if (os_memcmp(new_pmkid, pmkid, PMKID_LEN) == 0)
+ return entry;
+- entry = entry->next;
+ }
+ return NULL;
+ }