From d54b99f86aeb68fda57b1e9234aca943392858e2 Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Thu, 4 Jul 2024 13:34:47 -0500 Subject: [PATCH] Fixed access outbound array if line_len=256, i=784, esalt_len=1024 --- src/backend.c | 2 +- src/modules/module_11400.c | 2 +- src/modules/module_26600.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend.c b/src/backend.c index f7c916e1d..468a45731 100644 --- a/src/backend.c +++ b/src/backend.c @@ -3715,7 +3715,7 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co line_len = convert_from_hex (hashcat_ctx, line_buf, line_len); - if (line_len > PW_MAX) continue; + if (line_len >= PW_MAX) continue; char *line_buf_new = line_buf; diff --git a/src/modules/module_11400.c b/src/modules/module_11400.c index e5264d053..6b936b5e3 100644 --- a/src/modules/module_11400.c +++ b/src/modules/module_11400.c @@ -328,7 +328,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE { esalt_len = 1 + nonce_len + 1 + 32; - if (esalt_len > max_esalt_len) return (PARSER_SALT_LENGTH); + if (esalt_len >= max_esalt_len) return (PARSER_SALT_LENGTH); // init diff --git a/src/modules/module_26600.c b/src/modules/module_26600.c index 4f6d0de3b..9397cdc56 100644 --- a/src/modules/module_26600.c +++ b/src/modules/module_26600.c @@ -228,7 +228,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE tmp_len -= 16; - if (tmp_len < 30 || tmp_len > 3136) return (PARSER_CT_LENGTH); + if (tmp_len < 30 || tmp_len >= 3136) return (PARSER_CT_LENGTH); memcpy ((u8 *) metamask->ct_buf, tmp_buf, tmp_len);