Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BAY105-F29948B1BCFA2F1C917A214FDFD0@phx.gbl>
Date: Fri, 13 Jul 2007 22:37:56 +0200
From: "Frank Dittrich" <frank_dittrich@...mail.com>
To: john-users@...ts.openwall.com
Subject: Re: Strange bug when testing --format=ssha

I wrote:
>
>Testing --format=krb5 on x86_64 also produces either
>failing tests or segfaults, depending on which individual test cases I 
>comment out or activate.
[...]
>(I don't care whether or not this get fixed.)
I still don't care. Nevertheless, here are some of the bugs.

I ran
valgrind --leak-check=yes ./john --test --format=krb5
on my core duo laptop.

Valgrind discovered two memory leaks in the krb5 code.

One of them in str2key (KRB5_std.c:254):
text = (char*) malloc(strlen(user) + strlen(realm) + strlen(passwd));

This could be fixed by
free(text);
at the end of str2key.
A better solution would probably be to use a static buffer which is
large enough for the max. possible length.

The other is less critical, because it leaks memory just once
for each salt, in krb5_salt (KRB5_fmt.c:198)

krb5_salt should be changed to use a static buffer,
since it is impossible to free the memory if you have to
return the salt to the caller.


In addition to those two memory leaks, valgrind also reported
a large number of these messages:
Use of uninitialised value of size 4
   at 0x40A1972: DES_encrypt2 (in /usr/lib/libcrypto.so.0.9.8)

The address varies (from 0x40A1247 to 0x40A2064)
This one could also be a false positive.
I didn't bother to spend more effort on this.

But there must be more bugs, because fixing the memory leaks
doesn't make it work on my x86_64 system.
At least it doesn't consume that much memory now.

Frank

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-- 
To unsubscribe, e-mail john-users-unsubscribe@...ts.openwall.com and reply
to the automated confirmation request that will be sent to you.

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.