From b8b61894df7b9237c41e2afaa67861e1470f4c16 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Wed, 27 Oct 2021 19:43:51 +0200 Subject: [PATCH] Fix segfault in updated parser for -m 19700. To reproduce one need to trigger hashcat hash-mode autodetection: ./hashcat /etc/shadow --- src/modules/module_19700.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/module_19700.c b/src/modules/module_19700.c index 0854f1576..dcc02878d 100644 --- a/src/modules/module_19700.c +++ b/src/modules/module_19700.c @@ -123,6 +123,11 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE const char *usr_start = line_buf + strlen(SIGNATURE_KRB5TGS); char *usr_end = strchr ((const char *) usr_start, '$'); + if (usr_end == NULL) + { + return (PARSER_SEPARATOR_UNMATCHED); + } + if (*(usr_end+1) == '$'){ is_machine_account = 1; usr_end++;