Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Sep 2013 08:08:14 +0530
From: Sayantan Datta <std2048@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: mask mode bug (was: Sayantan's Weekly Report #12)

On Thu, Sep 5, 2013 at 2:32 AM, magnum <john.magnum@...hmail.com> wrote:

> 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
>

Hi magnum,

I compiled with the option -g o0 but still gdb says it can't load the
symbols. Can you help?

sayantan@...antan:~/Jtr-bm/run$ GWS=65536 gdb john
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/sayantan/Jtr-bm/run/john...(no debugging symbols
found)...done.
(gdb) r -format=raw-md5-opencl dynamic_0_tst.in
Starting program: /home/sayantan/Jtr-bm/run/john -format=raw-md5-opencl
dynamic_0_tst.in
warning: no loadable sections found in added symbol-file system-supplied
DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff290e700 (LWP 10454)]
[New Thread 0x7ffff17bd700 (LWP 10455)]
Device 0: Turks (AMD Radeon HD 7600M Serie)
Local worksize (LWS) 64, global worksize (GWS) 65536
Loaded 1500 password hashes with no different salts (Raw-MD5-opencl [MD5
OpenCL (inefficient, development use only)])
Press 'q' or Ctrl-C to abort, almost any other key for status

Program received signal SIGSEGV, Segmentation fault.
0x00000000005db0a2 in ?? ()

Regards,
Sayantan

[ CONTENT OF TYPE text/html SKIPPED ]

Powered by blists - more mailing lists

Your e-mail address:

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