Browse Source

FILS: Stop processing if fils_rmsk_to_pmk() fails

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>
Jouni Malinen 8 years ago
parent
commit
275cc94280
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/rsn_supp/wpa.c

+ 2 - 0
src/rsn_supp/wpa.c

@@ -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");