FT: Fix TKIP group key configuration in FT protocol
The Michael MIC TX and RX keys needs to be swapped in the FT case just like in all other TKIP key configuration cases. This fixes issues where TKIP as group cipher resulted in Michael MIC failures being detected for each received group-addressed frame after FT protocol use. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
e78aaca0da
commit
b54c9ff9ce
1 changed files with 7 additions and 0 deletions
|
@ -596,6 +596,13 @@ static int wpa_ft_process_gtk_subelem(struct wpa_sm *sm, const u8 *gtk_elem,
|
|||
}
|
||||
|
||||
wpa_hexdump_key(MSG_DEBUG, "FT: GTK from Reassoc Resp", gtk, keylen);
|
||||
if (sm->group_cipher == WPA_CIPHER_TKIP) {
|
||||
/* Swap Tx/Rx keys for Michael MIC */
|
||||
u8 tmp[8];
|
||||
os_memcpy(tmp, gtk + 16, 8);
|
||||
os_memcpy(gtk + 16, gtk + 24, 8);
|
||||
os_memcpy(gtk + 24, tmp, 8);
|
||||
}
|
||||
if (wpa_sm_set_key(sm, alg, broadcast_ether_addr, keyidx, 0,
|
||||
gtk_elem + 3, rsc_len, gtk, keylen) < 0) {
|
||||
wpa_printf(MSG_WARNING, "WPA: Failed to set GTK to the "
|
||||
|
|
Loading…
Reference in a new issue