From f6fe5657a3905fb8e7a4f75f2ef983206f44f0f9 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sat, 26 Aug 2017 14:40:53 +0200 Subject: [PATCH] Fixed an integer overflow in masks not skipped when loaded from file --- docs/changes.txt | 1 + src/hashcat.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 975c40f60..86488d8c8 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -26,6 +26,7 @@ - Fixed a missing salt length value in benchmark mode for SIP - Fixed an invalid progress value in status view if words from the base wordlist get rejected because of length - Fixed an integer overflow in innerloop_step and innerloop_cnt variables +- Fixed an integer overflow in masks not skipped when loaded from file - Fixed a parser error for mode -m 9820 = MS Office <= 2003 $3, SHA1 + RC4, collider #2 - Fixed a problem with changed current working directory, for instance by using --restore together with --remove - Fixed a problem with the conversion to the $HEX[] format: convert/hexify also all passwords of the format $HEX[] diff --git a/src/hashcat.c b/src/hashcat.c index 7ffe38c5d..e590a7f1a 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -117,13 +117,17 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx) * Update attack-mode specific stuff based on mask */ - mask_ctx_update_loop (hashcat_ctx); + const int rc_mask_ctx_update_loop = mask_ctx_update_loop (hashcat_ctx); + + if (rc_mask_ctx_update_loop == -1) return 0; /** * Update attack-mode specific stuff based on wordlist */ - straight_ctx_update_loop (hashcat_ctx); + const int rc_straight_ctx_update_loop = straight_ctx_update_loop (hashcat_ctx); + + if (rc_straight_ctx_update_loop == -1) return 0; // words base