aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/wpa_common.h
diff options
context:
space:
mode:
authorMathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>2017-07-12 14:03:24 (GMT)
committerJouni Malinen <j@w1.fi>2017-10-15 23:03:47 (GMT)
commitcb5132bb35698cc0c743e34fe0e845dfc4c3e410 (patch)
tree1c410def0d2ce4b1e5cac1b31d7533296d5506fb /src/common/wpa_common.h
parent0e3bd7ac684a2289aa613347e2f3ad54ad6a9449 (diff)
downloadhostap-cb5132bb35698cc0c743e34fe0e845dfc4c3e410.zip
hostap-cb5132bb35698cc0c743e34fe0e845dfc4c3e410.tar.gz
hostap-cb5132bb35698cc0c743e34fe0e845dfc4c3e410.tar.bz2
Prevent reinstallation of an already in-use group key
Track the current GTK and IGTK that is in use and when receiving a (possibly retransmitted) Group Message 1 or WNM-Sleep Mode Response, do not install the given key if it is already in use. This prevents an attacker from trying to trick the client into resetting or lowering the sequence counter associated to the group key. Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
Diffstat (limited to 'src/common/wpa_common.h')
-rw-r--r--src/common/wpa_common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
index cc8edf8..0872b12 100644
--- a/src/common/wpa_common.h
+++ b/src/common/wpa_common.h
@@ -221,6 +221,17 @@ struct wpa_ptk {
size_t tk_len;
};
+struct wpa_gtk {
+ u8 gtk[WPA_GTK_MAX_LEN];
+ size_t gtk_len;
+};
+
+#ifdef CONFIG_IEEE80211W
+struct wpa_igtk {
+ u8 igtk[WPA_IGTK_MAX_LEN];
+ size_t igtk_len;
+};
+#endif /* CONFIG_IEEE80211W */
/* WPA IE version 1
* 00-50-f2:1 (OUI:OUI type)