|
Message-ID: <BLU0-SMTP2097F2FF73BABC44557DD9CFDCD0@phx.gbl> Date: Tue, 16 Apr 2013 18:02:26 +0200 From: Frank Dittrich <frank_dittrich@...mail.com> To: john-dev@...ts.openwall.com Subject: Segfaults probably caused by DEBUG code in memory.c (was: Segfault for linux-x86-native with -DDEBUG added) On 04/16/2013 04:30 PM, Frank Dittrich wrote: > On 04/16/2013 01:32 PM, Frank Dittrich wrote: >> Since this points to a possible problem in the format itself, and not in >> the -DDEBUG code, here are all the formats that fail for >> linux-x86-clang-debug: >> >> hdaa ipb2 mschapv2 netntlm nt2 xsha mscash2 oracle11 raw-md5u sapb sapg >> sunmd5 wpapsk > > Turns out the problem is not limited to clang, but can be triggered with > gcc as well, by just adding -DDEBUG to CFLAGS: > > (unstable-jumbo)run $ for f in hdaa ipb2 mschapv2 netntlm nt2 xsha > mscash2 oracle11 raw-md5u sapb sapg sunmd5 wpapsk; do ./john --test=0 > --format=$f; done > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: HTTP Digest access authentication MD5 [128/128 SSE2 > intrinsics 12x]... Segmentation fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: Invision Power Board 2.x salted MD5 [128/128 SSE2 > intrinsics 12x]... Segmentation fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: MSCHAPv2 C/R MD4 DES [128/128 SSE2 intrinsics 12x]... > Rejected MSCHAPv2 hash with invalid 3rd block > Rejected MSCHAPv2 hash with invalid 3rd block > Rejected MSCHAPv2 hash with invalid 3rd block > Rejected MSCHAPv2 hash with invalid 3rd block > Segmentation fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: NTLMv1 C/R MD4 DES (ESS MD5) [128/128 SSE2 intrinsics > 12x]... Segmentation fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: NT MD4 [128/128 SSE2 intrinsics 12x]... Segmentation fault > (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: Mac OS X 10.4 - 10.6 salted SHA-1 [128/128 SSE2 4x]... > Segmentation fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: M$ Cache Hash 2 (DCC2) PBKDF2-HMAC-SHA-1 [128/128 SSE2 > 4x]... Segmentation fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: Oracle 11g SHA-1 [128/128 SSE2 4x]... Segmentation fault > (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: md5(unicode($p)) [128/128 SSE2 intrinsics 12x]... > Segmentation fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: SAP CODVN B (BCODE) [128/128 SSE2 intrinsics 12x]... > Segmentation fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: SAP CODVN F/G (PASSCODE) [128/128 SSE2 4x]... Segmentation > fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: SunMD5 [128/128 SSE2 intrinsics 12x x576]... Segmentation > fault (core dumped) > Warning: doing quick benchmarking - the performance numbers will be > inaccurate > Benchmarking: WPA-PSK PBKDF2-HMAC-SHA-1 [128/128 SSE2 4x]... > Segmentation fault (core dumped) > (unstable-jumbo)run $ First I tried to disable -DDEBUG for formats.c and/or loader.c, but that didn't help. Disabling -DDEBUG for memory.c made the segfaults disappear: 1. Add -DDEBUG to CLFAGS in Makefile. 2. make clean; make linux-x86-native 3. rm memory.o john.o 4. Remove -DDEBUG from CFLAGS in Makefile 5. make linux-x86-native 6. repeat test: for f in hdaa ipb2 mschapv2 netntlm nt2 xsha mscash2 oracle11 raw-md5u sapb sapg sunmd5 wpapsk; do ./john --test=1 --format=$f; done No segfaults. So I guess the -DDEBUG code in memory.c causes memory locations to be not aligned as expected. Frank
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.