mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-30 08:44:03 -05:00
wlantest: Fix EAPOL-Key Key Data padding removal
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
f58afccddd
commit
faf0fef1dc
@ -653,10 +653,17 @@ static void rx_data_eapol_key_3_of_4(struct wlantest *wt, const u8 *dst,
|
|||||||
if (p[0] == 0xdd && p[1] == 0x00) {
|
if (p[0] == 0xdd && p[1] == 0x00) {
|
||||||
/* Remove padding */
|
/* Remove padding */
|
||||||
plain_len = p - decrypted;
|
plain_len = p - decrypted;
|
||||||
|
p = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
p += 2 + p[1];
|
p += 2 + p[1];
|
||||||
}
|
}
|
||||||
|
if (p && p > decrypted && *p == 0xdd &&
|
||||||
|
p + 1 == decrypted + decrypted_len) {
|
||||||
|
/* Remove padding */
|
||||||
|
p--;
|
||||||
|
plain_len = p - decrypted;
|
||||||
|
}
|
||||||
|
|
||||||
os_memset(buf, 0, sizeof(buf));
|
os_memset(buf, 0, sizeof(buf));
|
||||||
h = (struct ieee80211_hdr *) buf;
|
h = (struct ieee80211_hdr *) buf;
|
||||||
|
Loading…
Reference in New Issue
Block a user