From 2845f0e71672ddd4a51463bfcb8dff68189d6325 Mon Sep 17 00:00:00 2001 From: philsmd Date: Tue, 24 Jan 2017 16:28:00 +0100 Subject: [PATCH 1/2] -m 11600: additional check for padding attack in case of unsupported coder --- src/interface.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/interface.c b/src/interface.c index aad311559..348e356f9 100644 --- a/src/interface.c +++ b/src/interface.c @@ -11331,6 +11331,14 @@ int seven_zip_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_ seven_zip->padding_check_full = false; } + if (data_type > 2) + { + if (margin < 4) // we can't be sure about too many false positives + { + return (PARSER_SALT_VALUE); + } + } + // real salt salt->salt_buf[0] = seven_zip->data_buf[0]; From 2bf49d424c82f27b12620cfac354d3e3c47f494e Mon Sep 17 00:00:00 2001 From: philsmd Date: Tue, 24 Jan 2017 16:32:31 +0100 Subject: [PATCH 2/2] -m 11600: additional check for padding attack in case of unsupported coder --- src/interface.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/interface.c b/src/interface.c index 348e356f9..ab6fd7b9c 100644 --- a/src/interface.c +++ b/src/interface.c @@ -11331,11 +11331,14 @@ int seven_zip_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_ seven_zip->padding_check_full = false; } - if (data_type > 2) + if (data_type != 0x80) { - if (margin < 4) // we can't be sure about too many false positives + if (data_type > 2) { - return (PARSER_SALT_VALUE); + if (margin < 4) // we can't be sure about too many false positives + { + return (PARSER_SALT_VALUE); + } } }