FILS: Add DHss into FILS-Key-Data derivation when using FILS SK+PFS
This part is missing from IEEE Std 802.11ai-2016, but the lack of DHss here means there would not be proper PFS for the case where PMKSA caching is used with FILS SK+PFS authentication. This was not really the intent of the FILS design and that issue was fixed during REVmd work with the changes proposed in https://mentor.ieee.org/802.11/dcn/17/11-17-0906-04-000m-fils-fixes.docx that add DHss into FILS-Key-Data (and PTK, in practice) derivation for the PMKSA caching case so that a unique ICK, KEK, and TK are derived even when using the same PMK. Note: This is not backwards compatible, i.e., this breaks PMKSA caching with FILS SK+PFS if only STA or AP side implementation is updated. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
41b8191485
commit
4cada9dcc1
7 changed files with 62 additions and 18 deletions
|
@ -3639,8 +3639,12 @@ int fils_process_auth(struct wpa_sm *sm, const u8 *bssid, const u8 *data,
|
|||
dh_ss ? wpabuf_len(dh_ss) : 0,
|
||||
sm->pmk, &sm->pmk_len);
|
||||
os_memset(rmsk, 0, sizeof(rmsk));
|
||||
|
||||
/* Don't use DHss in PTK derivation if PMKSA caching is not
|
||||
* used. */
|
||||
wpabuf_clear_free(dh_ss);
|
||||
dh_ss = NULL;
|
||||
|
||||
if (res)
|
||||
goto fail;
|
||||
|
||||
|
@ -3665,12 +3669,19 @@ int fils_process_auth(struct wpa_sm *sm, const u8 *bssid, const u8 *data,
|
|||
}
|
||||
|
||||
if (fils_pmk_to_ptk(sm->pmk, sm->pmk_len, sm->own_addr, sm->bssid,
|
||||
sm->fils_nonce, sm->fils_anonce, &sm->ptk,
|
||||
ick, &ick_len, sm->key_mgmt, sm->pairwise_cipher,
|
||||
sm->fils_nonce, sm->fils_anonce,
|
||||
dh_ss ? wpabuf_head(dh_ss) : NULL,
|
||||
dh_ss ? wpabuf_len(dh_ss) : 0,
|
||||
&sm->ptk, ick, &ick_len,
|
||||
sm->key_mgmt, sm->pairwise_cipher,
|
||||
sm->fils_ft, &sm->fils_ft_len) < 0) {
|
||||
wpa_printf(MSG_DEBUG, "FILS: Failed to derive PTK");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
wpabuf_clear_free(dh_ss);
|
||||
dh_ss = NULL;
|
||||
|
||||
sm->ptk_set = 1;
|
||||
sm->tptk_set = 0;
|
||||
os_memset(&sm->tptk, 0, sizeof(sm->tptk));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue