mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-30 08:44:03 -05:00
Use zero address when reporting unknown peer in SMK error
This avoids potential use of uninitialized stack memory when printing out peer address based on SMK error message that does not include the MAC address.
This commit is contained in:
parent
e4a6ea1d9c
commit
0e75b3c352
@ -634,6 +634,8 @@ static int wpa_supplicant_process_smk_error(
|
|||||||
|
|
||||||
if (kde.mac_addr && kde.mac_addr_len >= ETH_ALEN)
|
if (kde.mac_addr && kde.mac_addr_len >= ETH_ALEN)
|
||||||
os_memcpy(peer, kde.mac_addr, ETH_ALEN);
|
os_memcpy(peer, kde.mac_addr, ETH_ALEN);
|
||||||
|
else
|
||||||
|
os_memset(peer, 0, ETH_ALEN);
|
||||||
os_memcpy(&error, kde.error, sizeof(error));
|
os_memcpy(&error, kde.error, sizeof(error));
|
||||||
error_type = be_to_host16(error.error_type);
|
error_type = be_to_host16(error.error_type);
|
||||||
wpa_msg(sm->ctx->msg_ctx, MSG_INFO,
|
wpa_msg(sm->ctx->msg_ctx, MSG_INFO,
|
||||||
|
Loading…
Reference in New Issue
Block a user