From 63b7321be2a53d91d9be6ec2bc3db000eaacb979 Mon Sep 17 00:00:00 2001 From: jsteube Date: Mon, 13 Feb 2017 18:31:15 +0100 Subject: [PATCH] Fixed WPA/WPA2 cracking in case eapol frame is >= 248 byte --- OpenCL/inc_types.cl | 2 +- docs/changes.txt | 1 + include/interface.h | 2 +- src/interface.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenCL/inc_types.cl b/OpenCL/inc_types.cl index 86b5fc794..84898c653 100644 --- a/OpenCL/inc_types.cl +++ b/OpenCL/inc_types.cl @@ -787,7 +787,7 @@ typedef struct typedef struct wpa { u32 pke[25]; - u32 eapol[64]; + u32 eapol[64 + 16]; u16 eapol_len; u8 authenticated; u8 keyver; diff --git a/docs/changes.txt b/docs/changes.txt index 0c6023a1f..34b09088f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -46,6 +46,7 @@ - Fixed duplicate detection for WPA handshakes with the same ESSID - Fixed clEnqueueNDRangeKernel(): CL_UNKNOWN_ERROR caused by an invalid work-item count during weak-hash-check - Fixed nvapi datatype definition for NvS32 and NvU32 +- Fixed WPA/WPA2 cracking in case eapol frame is >= 248 byte ## ## Technical diff --git a/include/interface.h b/include/interface.h index 642e38417..8e8c9d81b 100644 --- a/include/interface.h +++ b/include/interface.h @@ -175,7 +175,7 @@ typedef struct pdf typedef struct wpa { u32 pke[25]; - u32 eapol[64]; + u32 eapol[64 + 16]; u16 eapol_len; u8 authenticated; u8 keyver; diff --git a/src/interface.c b/src/interface.c index 7a88d3f4b..eae8fb865 100644 --- a/src/interface.c +++ b/src/interface.c @@ -2784,7 +2784,7 @@ int wpa_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED memcpy (eapol_ptr, in.eapol, wpa->eapol_len); - memset (eapol_ptr + wpa->eapol_len, 0, 256 - wpa->eapol_len); + memset (eapol_ptr + wpa->eapol_len, 0, (256 + 64) - wpa->eapol_len); eapol_ptr[wpa->eapol_len] = 0x80;