]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FILS: Stop processing if fils_rmsk_to_pmk() fails
authorJouni Malinen <j@w1.fi>
Sun, 5 Feb 2017 12:38:07 +0000 (14:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 5 Feb 2017 12:38:07 +0000 (14:38 +0200)
While the key derivation steps are not expected to fail, this was
already done on the AP side, so do the same in the STA side.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/rsn_supp/wpa.c

index 88a66a51a83da331557fa35be93975eaaa9ae5ea..9c8ed6cb1604b684331c81a8a8ff0934a2aa6e68 100644 (file)
@@ -3439,6 +3439,8 @@ int fils_process_auth(struct wpa_sm *sm, const u8 *data, size_t len)
                                       sm->fils_nonce, sm->fils_anonce, NULL, 0,
                                       sm->pmk, &sm->pmk_len);
                os_memset(rmsk, 0, sizeof(rmsk));
+               if (res)
+                       return -1;
 
                if (!sm->fils_erp_pmkid_set) {
                        wpa_printf(MSG_DEBUG, "FILS: PMKID not available");