|
|
Message-ID: <BLU0-SMTP178FE6C1935A688A6B58D68FDE30@phx.gbl>
Date: Sat, 23 Jun 2012 12:02:39 +0200
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: segfault with ./john --test --format=md5ns in latest git, probably
related to recent john core changes
Hi all,
looks like this one is related to a recent change in core john, ot in
the format.
I get a
Segmentation fault (core dumped)
with
./john --test --format=md5ns
The backtrace in gdb and valgrind output both pointed to NS_set_key as
the culprit, specifically, the satement
key_len = strlen((char *) key);
To see what happens,I patched NS_fmt_plug.c
diff --git a/src/NS_fmt_plug.c b/src/NS_fmt_plug.c
index 864395d..665face 100644
--- a/src/NS_fmt_plug.c
+++ b/src/NS_fmt_plug.c
@@ -227,6 +227,10 @@ void NS_std_set_salt (void *salt)
static void NS_set_key(char *key, int index)
{
+
+fprintf(stderr, "_%s_\n", key);
+fflush(stderr);
+
key_len = strlen((char *) key);
if (key_len > PLAINTEXT_LENGTH)
key_len = PLAINTEXT_LENGTH;
$ ./john --test --format=md5ns
Benchmarking: Netscreen MD5 [32/32]... _password_
_netscreen_
_password_
_(null)_
Segmentation fault (core dumped)
IMO, NS_set_key should never be called with key = NULL.
Frank
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.