Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 28 Dec 2012 22:51:46 +0530
From: Dhiru Kholia <>
Subject: Re: Formats dmg, encfs and strip crash on longer passwords

On Fri, Dec 28, 2012 at 10:38 PM, Dhiru Kholia <> wrote:
> On Fri, Dec 28, 2012 at 10:26 PM, Frank Dittrich
> <> wrote:
>> All three formats claim to support a maximum password length of 32, but
>> if you try to use a word list with longer passwords, they all segfault
>> (at least on my 32bit Linux system).
> I get "stack smashing detected" on a 32-bit machine. These formats
> works fine on 64-bit machines (even when using ASAN).
>> $ ./john encfs --wordlist=test-p
>> Loaded 4 password hashes with 4 different salts (EncFS PBKDF2 AES /
>> Blowfish [32/32])
>> Segmentation fault (core dumped)
>> For me, this looks like a systematic error in Dhiru's formats.
>> Unfortunately, if I build a debug version, the error disappears.
> Yes, it is a common problem as these formats share a lot of code.
> I am working on fixing them.

The problem is in the pbkdf2 code I borrowed from Lukas ;)

The following patch (which is sure to be wrong!) avoids the crash.

diff --git a/src/encfs-pbkdf2.h b/src/encfs-pbkdf2.h
index 0cb0f4a..9a5ae17 100644
--- a/src/encfs-pbkdf2.h
+++ b/src/encfs-pbkdf2.h
@@ -282,7 +282,7 @@ void preproc(const uint8_t * key, uint32_t keylen,
        int i;
        uint32_t W[16], temp;
-       uint8_t ipad[20];
+       uint8_t ipad[32];
        uint32_t A = INIT_A;
        uint32_t B = INIT_B;
        uint32_t C = INIT_C;

The same problem exists in formats using same or similar pbkdf2 code.


What should be the max password length (which actually works) for
formats using your pbkdf2 code?. Can it be increased?


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.