[GH-ISSUE #676] OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_rawsha512_fmt_plug.c) at line (184) #328

Closed
opened 2026-10-14 03:01:30 +07:00 by bsakaguchi · 9 comments
Owner

Originally created by @frank-dittrich on GitHub (Jun 27, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/676

$ ./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
Originally created by @frank-dittrich on GitHub (Jun 27, 2014). Original GitHub issue: https://github.com/openwall/john/issues/676 ``` $ ./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 ```
bsakaguchi 2026-10-14 03:01:30 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@frank-dittrich commented on GitHub (Jun 27, 2014):

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)
<!-- gh-comment-id:47324441 --> @frank-dittrich commented on GitHub (Jun 27, 2014): 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) ```
Author
Owner

@ghost commented on GitHub (Jun 27, 2014):

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

  • they cannot handle partial keys transfers and bigger keys (new formats goes up to len < 55).
  • they are not faster.
  • they have nothing else or new (a user can use only '-ng' formats).

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

<!-- gh-comment-id:47354382 --> @ghost commented on GitHub (Jun 27, 2014): We can ask on john-dev about the removal of this 'old formats'. - they cannot handle partial keys transfers and bigger keys (new formats goes up to len < 55). - they are not faster. - they have nothing else or new (a user can use only '-ng' formats). Any complains? Anyone here wants to be a maintainer of this legacy?
Author
Owner

@frank-dittrich commented on GitHub (Jun 27, 2014):

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

<!-- gh-comment-id:47354872 --> @frank-dittrich commented on GitHub (Jun 27, 2014): Was your removal suggestion meant as a reply to https://github.com/magnumripper/JohnTheRipper/issues/677 instead?
Author
Owner

@ghost commented on GitHub (Jun 27, 2014):

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.

  • It can handle rawsha512 and XSHA512.
  • It goes up to len < 55.
  • It is faster.
  • It has a person to blame and ask for fixes when needed.
<!-- gh-comment-id:47357238 --> @ghost commented on GitHub (Jun 27, 2014): > 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. - It can handle rawsha512 and XSHA512. - It goes up to len < 55. - It is faster. - It has a person to blame and ask for fixes when needed.
Author
Owner

@frank-dittrich commented on GitHub (Jun 27, 2014):

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.)

<!-- gh-comment-id:47361329 --> @frank-dittrich commented on GitHub (Jun 27, 2014): 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.)
Author
Owner

@magnumripper commented on GitHub (Jun 27, 2014):

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.

<!-- gh-comment-id:47366777 --> @magnumripper commented on GitHub (Jun 27, 2014): 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.
Author
Owner

@frank-dittrich commented on GitHub (Jun 27, 2014):

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

<!-- gh-comment-id:47367103 --> @frank-dittrich commented on GitHub (Jun 27, 2014): I just wouldn't want to take any risks. Usually, the rename detection is quite good, though.
Author
Owner

@magnumripper commented on GitHub (Jun 27, 2014):

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.

<!-- gh-comment-id:47370586 --> @magnumripper commented on GitHub (Jun 27, 2014): 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.
Author
Owner

@magnumripper commented on GitHub (Jun 27, 2014):

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

<!-- gh-comment-id:47370996 --> @magnumripper commented on GitHub (Jun 27, 2014): But two commits are definitely enough. One for moving the deprecated formats to unused, and another one for renaming file and format labels.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#328
No description provided.