Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E51A40B.9070102@bredband.net>
Date: Mon, 22 Aug 2011 02:34:19 +0200
From: magnum <rawsmooth@...dband.net>
To: john-dev@...ts.openwall.com
Subject: valgrind vs rules

I get this from valgrind when running wordlist + rules (even in plain 
1.7.8, no jumbo):

==10714== Conditional jump or move depends on uninitialised value(s)
==10714==    at 0x426690: rules_apply (rules.c:917)
==10714==    by 0x42AC35: do_wordlist_crack (wordlist.c:218)
==10714==    by 0x420170: main (john.c:306)
==10714==  Uninitialised value was created by a stack allocation
==10714==    at 0x42AA6D: do_wordlist_crack (wordlist.c:133)


relevant part of rules.c:

905    out_OK:
906        in[rules_max_length] = 0;
907        if (last) {
908            if (length > rules_max_length)
909                length = rules_max_length;
910            if (length >= ARCH_SIZE - 1) {
911                if (*(ARCH_WORD *)in != *(ARCH_WORD *)last)
912                    return in;
913                if (strcmp(&in[ARCH_SIZE - 1], &last[ARCH_SIZE - 1]))
914                    return in;
915                return NULL;
916            }
917            if (last[length])
918                return in;
919            if (memcmp(in, last, length))
920                return in;
921            return NULL;
922        }
923        return in;

length here is the length of the current word. As I understand it, if 
the current word is longer than last has ever been, last[length] is 
uninitialized - and this is what valgrind complains about. I'm not sure 
I understand the purpose of line 917 at all so I'm not sure this is a 
problem at all?

magnum

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.