aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wnm_sta.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-10-25 13:45:50 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-10 16:40:54 (GMT)
commit2cb28a4c75bd2b5d6a56f43e13bff52a2d12bc13 (patch)
treeed874b26cfb8882f3cb4d80dd490f58b3d169616 /wpa_supplicant/wnm_sta.c
parentd0f56772ea822156825f64b5e7a5e214afd2a918 (diff)
downloadhostap-2cb28a4c75bd2b5d6a56f43e13bff52a2d12bc13.zip
hostap-2cb28a4c75bd2b5d6a56f43e13bff52a2d12bc13.tar.gz
hostap-2cb28a4c75bd2b5d6a56f43e13bff52a2d12bc13.tar.bz2
WNM: Ignore Key Data in WNM Sleep Mode Response frame if no PMF in use
WNM Sleep Mode Response frame is used to update GTK/IGTK only if PMF is enabled. Verify that PMF is in use before using this field on station side to avoid accepting unauthenticated key updates. (CVE-2015-5310) Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/wnm_sta.c')
-rw-r--r--wpa_supplicant/wnm_sta.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 3b45bf6..9ab40c7 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -189,6 +189,12 @@ static void wnm_sleep_mode_exit_success(struct wpa_supplicant *wpa_s,
end = ptr + key_len_total;
wpa_hexdump_key(MSG_DEBUG, "WNM: Key Data", ptr, key_len_total);
+ if (key_len_total && !wpa_sm_pmf_enabled(wpa_s->wpa)) {
+ wpa_msg(wpa_s, MSG_INFO,
+ "WNM: Ignore Key Data in WNM-Sleep Mode Response - PMF not enabled");
+ return;
+ }
+
while (end - ptr > 1) {
if (2 + ptr[1] > end - ptr) {
wpa_printf(MSG_DEBUG, "WNM: Invalid Key Data element "