Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 May 2015 20:59:49 +0800
From: Kai Zhao <loverszhao@...il.com>
To: john-dev@...ts.openwall.com
Subject: [core John] Loader memory leak

There is memory leak, with the command :

./john 7z_fmt --loopback=test.pw --max-run-time=1

The problem is described here:

https://github.com/magnumripper/JohnTheRipper/issues/1230

It is fixed by #1255:

https://github.com/magnumripper/JohnTheRipper/pull/1255

Analysis of the problem
-------------------------------

The ldr_init_database() function is called twice. And we only free the
database in john_done(). *loop_db* is never freed until the exit of john.

...
static struct db_main database;
...
static void john_load(void)
{
    ...
    ldr_init_database(&database, &options.loader);
    ...
    if (options.flags & FLG_LOOPBACK_CHK &&
        database.format != &fmt_LM) {
        struct db_main loop_db;
        ...
        ldr_init_database(&loop_db, &options.loader);
        ...
    }
    ....
}

static void john_done(void)
{
    ...
    MEM_FREE(database.salt_hash);
    MEM_FREE(database.cracked_hash);
    ....
}


Thanks,

Kai

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.