From ef83575c8f9d4a957df1e93c5d2251f9e875b510 Mon Sep 17 00:00:00 2001 From: Jarle Thorsen Date: Mon, 8 Nov 2021 09:44:48 +0100 Subject: [PATCH] Increases the maximum value for s2k-count. The maximum s2k-count value is 65011712 according to the PGP spec. Increating this value fixes a salt iteration exception for hashes with non-default value for s2k-count. (Fix successfully tested with a hash with 62914560 s2k-count.) --- src/modules/module_17010.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module_17010.c b/src/modules/module_17010.c index fd9230c02..1438dcb9c 100644 --- a/src/modules/module_17010.c +++ b/src/modules/module_17010.c @@ -280,7 +280,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE const u32 salt_iter = hc_strtoul ((const char *) token.buf[11], NULL, 10); - if (salt_iter < 8 || salt_iter > 1000000) return (PARSER_SALT_ITERATION); + if (salt_iter < 8 || salt_iter > 65011712) return (PARSER_SALT_ITERATION); salt->salt_iter = salt_iter;