From 6b5af5e849f6955f0a48e718e33bad14e51bce93 Mon Sep 17 00:00:00 2001 From: Jukka Ojanen Date: Mon, 12 Jul 2021 14:33:24 +0300 Subject: [PATCH 1/2] Fix leaks in dictstat_destroy --- src/dictstat.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/dictstat.c b/src/dictstat.c index 97fcdd92d..695c89b72 100644 --- a/src/dictstat.c +++ b/src/dictstat.c @@ -84,8 +84,6 @@ void dictstat_destroy (hashcat_ctx_t *hashcat_ctx) if (dictstat_ctx->enabled == false) return; - if (hashconfig->dictstat_disable == true) return; - hcfree (dictstat_ctx->filename); hcfree (dictstat_ctx->base); From 4e773f32b29325182c0088171e1ce9398e48c6a4 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Tue, 13 Jul 2021 22:22:53 +0200 Subject: [PATCH 2/2] Fix variable declaration block level in -m 19600 and -m 19700 --- OpenCL/m19600-pure.cl | 10 ++++++---- OpenCL/m19700-pure.cl | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/OpenCL/m19600-pure.cl b/OpenCL/m19600-pure.cl index c8f3d2907..e9a015e9a 100644 --- a/OpenCL/m19600-pure.cl +++ b/OpenCL/m19600-pure.cl @@ -800,13 +800,15 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t */ u32 shift = last_block_size % 4; + u32 mask; + switch (remaining_blocks) { case 0: last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; - u32 mask = (0xffffffff >> ((4 - last_block_size) * 8)); + mask = (0xffffffff >> ((4 - last_block_size) * 8)); last_plaintext[0] = last_block[0] ^ (decrypted_block[0] & mask); last_plaintext[0] = hc_swap32_S (last_plaintext[0]); @@ -835,7 +837,7 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t { last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; - u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); + mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); last_plaintext[0] = last_block[0] ^ decrypted_block[0]; last_plaintext[1] = last_block[1] ^ (decrypted_block[1] & mask); @@ -872,7 +874,7 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t { last_block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 2]; - u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); + mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); last_plaintext[0] = last_block[0] ^ decrypted_block[0]; last_plaintext[1] = last_block[1] ^ decrypted_block[1]; @@ -914,7 +916,7 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t { last_block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 3]; - u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); + mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); last_plaintext[0] = last_block[0] ^ decrypted_block[0]; last_plaintext[1] = last_block[1] ^ decrypted_block[1]; diff --git a/OpenCL/m19700-pure.cl b/OpenCL/m19700-pure.cl index 087a12bbf..f59bd62ca 100644 --- a/OpenCL/m19700-pure.cl +++ b/OpenCL/m19700-pure.cl @@ -863,13 +863,15 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t */ u32 shift = last_block_size % 4; + u32 mask; + switch (remaining_blocks) { case 0: last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; - u32 mask = (0xffffffff >> ((4 - last_block_size) * 8)); + mask = (0xffffffff >> ((4 - last_block_size) * 8)); last_plaintext[0] = last_block[0] ^ (decrypted_block[0] & mask); last_plaintext[0] = hc_swap32_S (last_plaintext[0]); @@ -898,7 +900,7 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t { last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; - u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); + mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); last_plaintext[0] = last_block[0] ^ decrypted_block[0]; last_plaintext[1] = last_block[1] ^ (decrypted_block[1] & mask); @@ -935,7 +937,7 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t { last_block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 2]; - u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); + mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); last_plaintext[0] = last_block[0] ^ decrypted_block[0]; last_plaintext[1] = last_block[1] ^ decrypted_block[1]; @@ -977,7 +979,7 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t { last_block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 3]; - u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); + mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); last_plaintext[0] = last_block[0] ^ decrypted_block[0]; last_plaintext[1] = last_block[1] ^ decrypted_block[1];