Date: Wed, 4 Sep 2013 23:02:45 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: mask mode bug (was: Sayantan's Weekly Report #12) On 4 Sep, 2013, at 20:47 , Sayantan Datta <std2048@...il.com> wrote: > On Wed, Sep 4, 2013 at 3:33 AM, magnum <john.magnum@...hmail.com> wrote: > The enclosed patch seems to do the trick. > > Yes, it was a bug indeed. I have applied this fix to other formats too with some minor modifications. Thank you. BTW what is the best way to find these type of bugs other than experience? In this case it was just trivial gdb. Compile with -g -O0 and make it segfault: (gdb) r bigtest.rawmd5 -form:raw-md5-opencl -mask=?A?A?A?A Starting program: john bigtest.rawmd5 -form:raw-md5-opencl -mask=?A?A?A?A ... Device 1: GeForce GT 650M Multiply the end c/s with:224 Local worksize (LWS) 64, global worksize (GWS) 4096 Loaded 61747 password hashes with no different salts (Raw-MD5-opencl [MD5 OpenCL (inefficient, development use only)]) Remaining 61739 password hashes with no different salts Using kernel md5_ccc... Press 'q' or Ctrl-C to abort, almost any other key for status Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x00000001017ff000 0x0000000100474d16 in crypt_all (pcount=0x7fff5fbfdfc8, salt=0x1019c3b18) at opencl_rawmd5_fmt.c:728 728 else partial_hashes[i] = 0; (gdb) print i $1 = 32767 Checked what size partial_hashes was allocated for, and in this case it was just 4096. Gotcha. Hardest part for me was to understand the totally different use of partial_hashes in mask mode. 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.