Skip to content

Commit 48e68b8

Browse files
jmalinenandi34
authored andcommitted
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. Bug: 25266660 Change-Id: Ib4b80f9c9e4aa5ea0b827c5202809c9660ad9b39 Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> (cherry picked from commit 1e9857b)
1 parent 0ae423e commit 48e68b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

wpa_supplicant/wnm_sta.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ static void wnm_sleep_mode_exit_success(struct wpa_supplicant *wpa_s,
185185
end = ptr + key_len_total;
186186
wpa_hexdump_key(MSG_DEBUG, "WNM: Key Data", ptr, key_len_total);
187187

188+
if (key_len_total && !wpa_sm_pmf_enabled(wpa_s->wpa)) {
189+
wpa_msg(wpa_s, MSG_INFO,
190+
"WNM: Ignore Key Data in WNM-Sleep Mode Response - PMF not enabled");
191+
return;
192+
}
193+
188194
while (ptr + 1 < end) {
189195
if (ptr + 2 + ptr[1] > end) {
190196
wpa_printf(MSG_DEBUG, "WNM: Invalid Key Data element "

0 commit comments

Comments
 (0)