[GH-ISSUE #1518] Invalid signature line trying to link to dynamic format #989

Closed
opened 2026-10-14 03:31:04 +07:00 by bsakaguchi · 16 comments
Owner

Originally created by @frank-dittrich on GitHub (Jul 8, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1518

Originally assigned to: @jfoug on GitHub.

Tested on super


$ ./john --make_check
./john: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by ./john)
./john: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by ./john)
Testing: descrypt, traditional crypt(3) [DES 128/128 AVX-16]... PASS
[...]

Testing: nk, Nuked-Klan CMS [SHA1 MD5 32/64]... PASS
Error, Invalid signature line trying to link to dynamic format.
Original format=md5ns
Signature line=$dynamic_2004$c8c5cd1d2f62efb1814649b7b01e6661$HEX$61646d696e3a41646d696e697374726174696f6e20546f6f6c733a

With --test=0, the next format after nk is

Testing: md5ns, Netscreen [md5($s.$p) (OSC) (PW > 31 bytes) 128/128 AVX 4x3]... PASS
$ ./john --list=build-info
./john: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by ./john)
./john: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by ./john)
Version: 1.8.0.6-jumbo-1-305-g5f3c270+
Build: linux-gnu 64-bit AVX-ac
SIMD: AVX, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1
$JOHN is ./
Format interface version: 13
Max. number of reported tunable costs: 3
Rec file version: REC4
Charset file version: CHR3
CHARSET_MIN: 1 (0x01)
CHARSET_MAX: 255 (0xff)
CHARSET_LENGTH: 24
Max. Markov mode level: 400
Max. Markov mode password length: 30
gcc version: 4.9.1
GNU libc version: 2.12 (loaded: 2.12)
OpenCL library version: 1.2
Crypto library: OpenSSL
OpenSSL library version: 01000105f
OpenSSL 1.0.1e-fips 11 Feb 2013
GMP library version: 4.3.1
File locking: fcntl()
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's
Originally created by @frank-dittrich on GitHub (Jul 8, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1518 Originally assigned to: @jfoug on GitHub. Tested on super ``` $ ./john --make_check ./john: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by ./john) ./john: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by ./john) Testing: descrypt, traditional crypt(3) [DES 128/128 AVX-16]... PASS [...] Testing: nk, Nuked-Klan CMS [SHA1 MD5 32/64]... PASS Error, Invalid signature line trying to link to dynamic format. Original format=md5ns Signature line=$dynamic_2004$c8c5cd1d2f62efb1814649b7b01e6661$HEX$61646d696e3a41646d696e697374726174696f6e20546f6f6c733a ``` With --test=0, the next format after nk is ``` Testing: md5ns, Netscreen [md5($s.$p) (OSC) (PW > 31 bytes) 128/128 AVX 4x3]... PASS ``` ``` $ ./john --list=build-info ./john: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by ./john) ./john: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by ./john) Version: 1.8.0.6-jumbo-1-305-g5f3c270+ Build: linux-gnu 64-bit AVX-ac SIMD: AVX, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1 $JOHN is ./ Format interface version: 13 Max. number of reported tunable costs: 3 Rec file version: REC4 Charset file version: CHR3 CHARSET_MIN: 1 (0x01) CHARSET_MAX: 255 (0xff) CHARSET_LENGTH: 24 Max. Markov mode level: 400 Max. Markov mode password length: 30 gcc version: 4.9.1 GNU libc version: 2.12 (loaded: 2.12) OpenCL library version: 1.2 Crypto library: OpenSSL OpenSSL library version: 01000105f OpenSSL 1.0.1e-fips 11 Feb 2013 GMP library version: 4.3.1 File locking: fcntl() fseek(): fseek ftell(): ftell fopen(): fopen memmem(): System's ```
bsakaguchi 2026-10-14 03:31:04 +07:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner

@magnumripper commented on GitHub (Jul 8, 2015):

Doesn't happen on my gear. Is this only when using "--make_check"? I've never used that option before.

<!-- gh-comment-id:119627980 --> @magnumripper commented on GitHub (Jul 8, 2015): Doesn't happen on my gear. Is this only when using "--make_check"? I've never used that option before.
Author
Owner

@magnumripper commented on GitHub (Jul 8, 2015):

I lied, it does happen here.

...
Testing: nk, Nuked-Klan CMS [SHA1 MD5 32/64]... (8xOMP) PASS
Error, Invalid signature line trying to link to dynamic format.
Original format=md5ns
Signature line=$dynamic_2004$c8c5cd1d2f62efb1814649b7b01e6661$HEX$61646d696e3a41646d696e697374726174696f6e20546f6f6c733a
<!-- gh-comment-id:119628406 --> @magnumripper commented on GitHub (Jul 8, 2015): I lied, it does happen here. ``` ... Testing: nk, Nuked-Klan CMS [SHA1 MD5 32/64]... (8xOMP) PASS Error, Invalid signature line trying to link to dynamic format. Original format=md5ns Signature line=$dynamic_2004$c8c5cd1d2f62efb1814649b7b01e6661$HEX$61646d696e3a41646d696e697374726174696f6e20546f6f6c733a ```
Author
Owner

@magnumripper commented on GitHub (Jul 8, 2015):

...and yes, it only happens with --make_check. So what is special about that option? Why does it even exist?

<!-- gh-comment-id:119629169 --> @magnumripper commented on GitHub (Jul 8, 2015): ...and yes, it only happens with `--make_check`. So what is special about that option? Why does it even exist?
Author
Owner

@frank-dittrich commented on GitHub (Jul 8, 2015):

It is a core option to verify builds, it is not even listed as an option. I remembered it when I compared Makefile.in and Makefile.legacy's check target.

<!-- gh-comment-id:119629368 --> @frank-dittrich commented on GitHub (Jul 8, 2015): It is a core option to verify builds, it is not even listed as an option. I remembered it when I compared Makefile.in and Makefile.legacy's check target.
Author
Owner

@magnumripper commented on GitHub (Jul 8, 2015):

It replaces argv with --test=0 But here's a big difference:

john.c:1237 (john_init)

    if (!make_check) {
#ifdef HAVE_JOHN_OMP_FALLBACK
        john_omp_fallback(argv);
#endif

        path_init(argv);
    }
(...)
    if (!make_check) {
        if (options.config)
        {
            path_init_ex(options.config);
            cfg_init(options.config, 0);
            cfg_init(CFG_FULL_NAME, 1);
            cfg_init(CFG_ALT_NAME, 0);
        }
        else
        {
#if JOHN_SYSTEMWIDE
            cfg_init(CFG_PRIVATE_FULL_NAME, 1);
            cfg_init(CFG_PRIVATE_ALT_NAME, 1);
#endif
            cfg_init(CFG_FULL_NAME, 1);
            cfg_init(CFG_ALT_NAME, 0);
        }
    }

So it doesn't initialize config. I'm surprised it works as well as it does. I think we can ignore this. Or perhaps ask Solar what is supposed to happen.

<!-- gh-comment-id:119630062 --> @magnumripper commented on GitHub (Jul 8, 2015): It replaces argv with `--test=0` But here's a big difference: john.c:1237 (john_init) ``` c if (!make_check) { #ifdef HAVE_JOHN_OMP_FALLBACK john_omp_fallback(argv); #endif path_init(argv); } (...) if (!make_check) { if (options.config) { path_init_ex(options.config); cfg_init(options.config, 0); cfg_init(CFG_FULL_NAME, 1); cfg_init(CFG_ALT_NAME, 0); } else { #if JOHN_SYSTEMWIDE cfg_init(CFG_PRIVATE_FULL_NAME, 1); cfg_init(CFG_PRIVATE_ALT_NAME, 1); #endif cfg_init(CFG_FULL_NAME, 1); cfg_init(CFG_ALT_NAME, 0); } } ``` So it doesn't initialize config. I'm surprised it works as well as it does. I think we can ignore this. Or perhaps ask Solar what is supposed to happen.
Author
Owner

@frank-dittrich commented on GitHub (Jul 8, 2015):

Yes, it fails on the first thin format which is linked to a dynamic format from a config file.
I think it is not worth the effort to address this.
(I wouldn't want to read the config for --make_check.)
I'll keep the issue open for a while, may be I find an easy way which doesn't involve messing with a lot of @jfoug's code.

<!-- gh-comment-id:119652125 --> @frank-dittrich commented on GitHub (Jul 8, 2015): Yes, it fails on the first thin format which is linked to a dynamic format from a config file. I think it is not worth the effort to address this. (I wouldn't want to read the config for --make_check.) I'll keep the issue open for a while, may be I find an easy way which doesn't involve messing with a lot of @jfoug's code.
Author
Owner

@ksimka commented on GitHub (Nov 14, 2015):

I have the same issue, but in runtime, not while doing make.

./run/john --format=dynamic-all some_passwd

...

Error, Invalid signature line trying to link to dynamic format.
Original format=md5ns
Signature line=$dynamic_2004$c8c5cd1d2f62efb1814649b7b01e6661$HEX$61646d696e3a41646d696e697374726174696f6e20546f6f6c733a

If you need any additional info - just ask.

<!-- gh-comment-id:156694430 --> @ksimka commented on GitHub (Nov 14, 2015): I have the same issue, but in runtime, not while doing make. ``` ./run/john --format=dynamic-all some_passwd ... Error, Invalid signature line trying to link to dynamic format. Original format=md5ns Signature line=$dynamic_2004$c8c5cd1d2f62efb1814649b7b01e6661$HEX$61646d696e3a41646d696e697374726174696f6e20546f6f6c733a ``` If you need any additional info - just ask.
Author
Owner

@magnumripper commented on GitHub (Nov 14, 2015):

@ksimka is that with latest code from here?

<!-- gh-comment-id:156718388 --> @magnumripper commented on GitHub (Nov 14, 2015): @ksimka is that with latest code from here?
Author
Owner

@frank-dittrich commented on GitHub (Nov 14, 2015):

@magnumripper Why would you think the "issue" is gone with latest bleeding-jumbo?
I think an end user isn't supposed to run ./john --make_check, since that option isn't mentioned in john's usage output or --list=hidden-options output..

<!-- gh-comment-id:156729632 --> @frank-dittrich commented on GitHub (Nov 14, 2015): @magnumripper Why would you think the "issue" is gone with latest bleeding-jumbo? I think an end user isn't supposed to run `./john --make_check`, since that option isn't mentioned in john's usage output or --list=hidden-options output..
Author
Owner

@magnumripper commented on GitHub (Nov 14, 2015):

I was just asking in case he was running J1 or something like that since I can't reproduce. And @ksimka wasn't running -make-check but some totally normal command.

@ksimka what if you try ./run/john --format=dynamic-all -pot=test.pot some_passwd with "test.pot" being some non-existing file - does the problem go away?

<!-- gh-comment-id:156752340 --> @magnumripper commented on GitHub (Nov 14, 2015): I was just asking in case he was running J1 or something like that since I can't reproduce. And @ksimka wasn't running -make-check but some totally normal command. @ksimka what if you try `./run/john --format=dynamic-all -pot=test.pot some_passwd` with "test.pot" being some non-existing file - does the problem go away?
Author
Owner

@ksimka commented on GitHub (Nov 15, 2015):

@magnumripper

@ksimka is that with latest code from here?

Yes.

@ksimka what if you try ./run/john --format=dynamic-all -pot=test.pot some_passwd with "test.pot" being some non-existing file - does the problem go away?

Sounds weird, but yes, it's not reproduced anymore. I mean, once running that command with -pot now john is running without it.

Must be I changed something, cause I don't believe in magic.

<!-- gh-comment-id:156811714 --> @ksimka commented on GitHub (Nov 15, 2015): @magnumripper > @ksimka is that with latest code from here? Yes. > @ksimka what if you try ./run/john --format=dynamic-all -pot=test.pot some_passwd with "test.pot" being some non-existing file - does the problem go away? Sounds weird, but yes, it's not reproduced anymore. I mean, once running that command with -pot now john is running without it. Must be I changed something, cause I don't believe in magic.
Author
Owner

@magnumripper commented on GitHub (Nov 15, 2015):

Wow, I wasn't expecting it to go away for good, just for that run. I suppose something in your normal john.pot file triggered it.

<!-- gh-comment-id:156814778 --> @magnumripper commented on GitHub (Nov 15, 2015): Wow, I wasn't expecting it to go away for good, just for that run. I suppose something in your normal john.pot file triggered it.
Author
Owner

@jfoug commented on GitHub (Nov 16, 2015):

I am unable to replicate this bug at all. Well, I can for --make_check. That one is SUPER easy to see why. We never load config for a make_check (reason for this is NOT obvious).

But I have tried sprinkling a lot of different hash signatures into a .pot file, and an input file, and I have not been able to get this to fail with --format=dynamic-all

<!-- gh-comment-id:157193534 --> @jfoug commented on GitHub (Nov 16, 2015): I am unable to replicate this bug at all. Well, I can for --make_check. That one is SUPER easy to see why. We never load config for a make_check (reason for this is NOT obvious). But I have tried sprinkling a lot of different hash signatures into a .pot file, and an input file, and I have not been able to get this to fail with --format=dynamic-all
Author
Owner

@magnumripper commented on GitHub (Nov 16, 2015):

Well he says he can't reproduce it anymore so let's consider it some kind of PEBCAK (no offense, just a label 😉 ).

<!-- gh-comment-id:157205028 --> @magnumripper commented on GitHub (Nov 16, 2015): Well he says he can't reproduce it anymore so let's consider it some kind of PEBCAK (no offense, just a label :wink: ).
Author
Owner

@magnumripper commented on GitHub (Nov 16, 2015):

BTW I consider the original -make-check issue a non-issue since that option is not documented anywhere. Perhaps we should even actually disable it completely in Jumbo.

<!-- gh-comment-id:157205321 --> @magnumripper commented on GitHub (Nov 16, 2015): BTW I consider the original `-make-check` issue a non-issue since that option is not documented anywhere. Perhaps we should even actually disable it completely in Jumbo.
Author
Owner

@frank-dittrich commented on GitHub (Nov 17, 2015):

What if you replace dynamic.conf with an empty file?
That would still be PEBKAC, but may be the error message could be improved?

<!-- gh-comment-id:157230944 --> @frank-dittrich commented on GitHub (Nov 17, 2015): What if you replace dynamic.conf with an empty file? That would still be PEBKAC, but may be the error message could be improved?
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#989
No description provided.