openwall / john

John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs
https://www.openwall.com/john/
Other
10.21k stars 2.09k forks source link

OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_rawsha512_fmt_plug.c) at line (184) #676

Closed frank-dittrich closed 10 years ago

frank-dittrich commented 10 years ago
$ ./john --list=format-details --format=opencl |cut -f 1
Device 0: GeForce GTX 570
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 14336
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, global worksize (GWS) 49
lotus5-opencl
descrypt-opencl
ssha-opencl
nt-opencl
ntlmv2-opencl
agilekeychain-opencl
bcrypt-opencl
blockchain-opencl
md5crypt-opencl
sha256crypt-opencl
sha512crypt-opencl
dmg-opencl
encfs-opencl
gpg-opencl
keychain-opencl
keyring-opencl
krb5pa-md5-opencl
krb5pa-sha1-opencl
mscash2-opencl
mysql-sha1-opencl
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, Global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, global worksize (GWS) 49
Device 0: GeForce GTX 570
Local worksize (LWS) 7, global worksize (GWS) 49
Device 0: GeForce GTX 570
OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_rawsha512_fmt_plug.c) at line (184) - (Error while allocating memory for passwords)
o5logon-opencl
ODF-opencl
ODF-AES-opencl
office2007-opencl
office2010-opencl
office2013-opencl
PBKDF2-HMAC-SHA256-opencl
grub-opencl
phpass-opencl
pwsafe-opencl
RAKP-opencl
rar-opencl
Raw-MD4-opencl
Raw-MD5-opencl
Raw-SHA1-opencl
Raw-SHA256-opencl
frank-dittrich commented 10 years ago

Can also be reproduced using

./john --list=format-all-details --format=Raw-SHA512-opencl
Device 0: GeForce GTX 570
OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_rawsha512_fmt_plug.c) at line (184) - (Error while allocating memory for passwords)
claudioandre-br commented 10 years ago

We can ask on john-dev about the removal of this 'old formats'.

Any complains? Anyone here wants to be a maintainer of this legacy?

frank-dittrich commented 10 years ago

Was your removal suggestion meant as a reply to https://github.com/magnumripper/JohnTheRipper/issues/677 instead?

claudioandre-br commented 10 years ago

Was your removal suggestion meant as a reply to #677 instead?

No, I mean we can remove: . opencl_rawsha512_fmt_plug.c and opencl_xsha512_fmt_plug.c)

There is an 'NG' file named opencl_rawsha512-ng_fmt_plug.

frank-dittrich commented 10 years ago

OK, then I think we should move the old formats to unused/ (or just delete them), and in a separate commit rename blame opencl_rawsha512-ng_fmt_plug.c. The new name should get rid of the "-ng" part, and somehow indicate that this file implements 2 formats. In a third commit, we should get rid of the "-ng" in the format label(s). (These formats are new in bleeding-jumbo, they didn't exist in unstable-jumbo. So no need to worry about maintaining backwards compatibility for .rec files of older releases.)

magnumripper commented 10 years ago

I agree. Do you think Git will have problems following what happened if we do it in a single commit? I bet it will work fine but we could test that in a topic branch.

frank-dittrich commented 10 years ago

I just wouldn't want to take any risks. Usually, the rename detection is quite good, though.

magnumripper commented 10 years ago

Here's the merge commit of MSCHAPv2_fmt_plug.c and NETNTLM_fmt_plug.c to ntlmv1_mschapv2_fmt_plug.c:

$ git show --stat c041da9
commit c041da92d7123b92d55a57a4082ca859a01a3e4e
Author: magnum <john.magnum@hushmail.com>
Date:   Thu Mar 7 14:58:31 2013 +0100

    Merge MSCHAPv2_fmt_plug.c and NETNTLM_fmt_plug.c to one file:
    ntlmv1_mschapv2_fmt_plug.c, sharing much of the code.

 src/MSCHAPv2_fmt_plug.c        | 1021 ---------------------------------
 src/NETNTLM_fmt_plug.c         |  883 -----------------------------
 src/ntlmv1_mschapv2_fmt_plug.c | 1337 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1337 insertions(+), 1904 deletions(-)

This is awesome:

$ git blame ntlmv1_mschapv2_fmt_plug.c | head
de989e6e src/MSCHAPv2_fmt_plug.c        (magnum               2011-11-09 12:20:47 +0100    1) /*
c041da92 src/ntlmv1_mschapv2_fmt_plug.c (magnum               2013-03-07 14:58:31 +0100    2)  * Previous files MSCHAPv2_fmt_plug.c and NETNTLM_fmt_plug.c now merged into
c041da92 src/ntlmv1_mschapv2_fmt_plug.c (magnum               2013-03-07 14:58:31 +0100    3)  * this one file, sharing functions.
de989e6e src/MSCHAPv2_fmt_plug.c        (magnum               2011-11-09 12:20:47 +0100    4)  *
c041da92 src/ntlmv1_mschapv2_fmt_plug.c (magnum               2013-03-07 14:58:31 +0100    5)  * NETNTLM_fmt.c -- NTLM Challenge/Response
c041da92 src/ntlmv1_mschapv2_fmt_plug.c (magnum               2013-03-07 14:58:31 +0100    6)  * Written by JoMo-Kun <jmk at foofus.net> in 2007
de989e6e src/MSCHAPv2_fmt_plug.c        (magnum               2011-11-09 12:20:47 +0100    7)  * and placed in the public domain.
de989e6e src/MSCHAPv2_fmt_plug.c        (magnum               2011-11-09 12:20:47 +0100    8)  *
c041da92 src/ntlmv1_mschapv2_fmt_plug.c (magnum               2013-03-07 14:58:31 +0100    9)  * This algorithm is designed for performing brute-force cracking of the NTLM
c041da92 src/ntlmv1_mschapv2_fmt_plug.c (magnum               2013-03-07 14:58:31 +0100   10)  * (version 1) challenge/response pairs exchanged during network-based

It just knows where each change come from, even if it was in another file.

EDIT: However, it doesn't blame a single line to the older NETNTLM_fmt_plug.c so indeed it was a bit fooled.

magnumripper commented 10 years ago

But two commits are definitely enough. One for moving the deprecated formats to unused, and another one for renaming file and format labels.