Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 8 Jun 2013 11:26:38 +0530
From: Sayantan Datta <>
Subject: Re: peculiar problem with fmt->params.max_keys_per_crypt
 in bleeding


On Fri, Jun 7, 2013 at 7:42 PM, Solar Designer <> wrote:

> Sayantan -
> On Fri, Jun 07, 2013 at 06:15:20PM +0530, Sayantan Datta wrote:
> > I am getting random segmentation faults when crypt all returns anything
> > greater than fmt->params.max_keys_per_crypt.
> Didn't this work for you before, in your descrypt-opencl with hard-coded
> all-numeric passwords pattern experiment?

 Yes it did. But it would segfault maybe 1 out of 100 times. But when I
witched from patched kernel to default one, it would segfault every time. I
checked the defualt kernel which produced the same result as the patched
ones but it would just segfault.  I checked all the differences in host
code between the two kernel and even checked common-opencl.c but couldn't
find anything.

> > The problem goes away if I
> > simply increase max_keys_per_crypt which I don't want to.  Is this even a
> > problem or is it by design ?
> It's not by design.  There must be a bug, perhaps in your format not
> supporting other format methods on index values beyond max_keys_per_crypt.
> If your crypt_all() returns such values, then many of your other methods
> must be prepared to be called with such values.

I checked and rechecked my format methods like a thousand times but then I
decided to go a little deeper because I am sure the segfault wasn't from
any of the internal methods. Although it may be due to some wrong setup in
the format. So I checked into cracker.c(and other relevant files) to find
out any memory allocations based on max_keys_per_crypt. I modified line
number 123 in cracker.c to the following and the problem was gone.

if (db->loaded) {
        size = /*crk_params.max_keys_per_crypt*/2097152 * sizeof(int64);
        memset(crk_timestamps = mem_alloc_tiny(size,sizeof(int64)), -1,


Content of type "text/html" skipped

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.