Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 23 May 2011 06:18:57 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: "excessive partial hash collisions detected" for mskrb5

magnum -

On Mon, May 23, 2011 at 02:05:41AM +0200, magnum wrote:
> On 2011-05-23 01:27, Solar Designer wrote:
> >I think we can add a check for zero binary_size to loader.c - and not
> >print the warning if so.
> 
> Yes, that sounds like a better idea.

Here's the change I committed.  Please apply it to your tree and test.

I think that in the long run I need to re-work the loader such that it
either uses its own hash functions or does dupe checking per-salt.

--- Owl/packages/john/john/src/loader.c:1.39	Tue Mar  1 08:31:24 2011
+++ Owl/packages/john/john/src/loader.c	Mon May 23 06:11:02 2011
@@ -465,7 +465,9 @@
 					db->options->flags |= DB_NODUP;
 					break;
 				}
-				if (collisions >= LDR_HASH_COLLISIONS_MAX) {
+				if (++collisions <= LDR_HASH_COLLISIONS_MAX)
+					continue;
+				if (format->params.binary_size)
 					fprintf(stderr, "Warning: "
 					    "excessive partial hash "
 					    "collisions detected\n%s",
@@ -474,11 +476,13 @@
 					    "(cause: the \"format\" lacks "
 					    "proper binary_hash() function "
 					    "definitions)\n");
-					skip_dupe_checking = 1;
-					current_pw = NULL; /* no match */
-					break;
-				}
-				collisions++;
+				else
+					fprintf(stderr, "Warning: "
+					    "check for duplicates partially "
+					    "bypassed to speedup loading\n");
+				skip_dupe_checking = 1;
+				current_pw = NULL; /* no match */
+				break;
 			} while ((current_pw = current_pw->next_hash));
 
 			if (current_pw) continue;
 
Alexander

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ