[GH-ISSUE #2246] ASan error in Salted-SHA1 format #1503

Closed
opened 2026-10-15 04:18:58 +07:00 by bsakaguchi · 7 comments
Owner

Originally created by @frank-dittrich on GitHub (Aug 29, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2246

Originally assigned to: @frank-dittrich on GitHub.

(bleeding-jumbo)run $ cat fail_Salted-SHA1.pw 
{SSHA}bPXG4M1KkwZh2Hbgnuoszvpa
(bleeding-jumbo)run $ ./john --format=Salted-SHA1 fail_Salted-SHA1.pw 
=================================================================
==434==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd39bb6f34 at pc 0x7f026c44dccf bp 0x7ffd39bb6ec0 sp 0x7ffd39bb6668
READ of size 4294967294 at 0x7ffd39bb6f34 thread T0
    #0 0x7f026c44dcce  (/lib64/libasan.so.3+0x5ecce)
    #1 0x72a1e0 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:217
    #2 0x7a1262 in ldr_load_pw_line /home/fd/git/JtR/src/loader.c:1004
    #3 0x7a23a0 in read_file /home/fd/git/JtR/src/loader.c:226
    #4 0x7a57ec in ldr_load_pw_file /home/fd/git/JtR/src/loader.c:1115
    #5 0x7986e3 in john_load /home/fd/git/JtR/src/john.c:1169
    #6 0x799f0b in john_init /home/fd/git/JtR/src/john.c:1496
    #7 0x79bdc1 in main /home/fd/git/JtR/src/john.c:1954
    #8 0x7f026a963730 in __libc_start_main (/lib64/libc.so.6+0x20730)
    #9 0x405e38 in _start (/home/fd/git/JtR/run/john+0x405e38)

Address 0x7ffd39bb6f34 is located in stack of thread T0 at offset 84 in frame
    #0 0x72a095 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:199

  This frame has 1 object(s):
    [32, 84) 'realcipher' <== Memory access at offset 84 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow (/lib64/libasan.so.3+0x5ecce) 
Shadow bytes around the buggy address:
  0x10002736ed90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10002736eda0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10002736edb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10002736edc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10002736edd0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
=>0x10002736ede0: 00 00 00 00 00 00[04]f4 f3 f3 f3 f3 00 00 00 00
  0x10002736edf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
  0x10002736ee00: f1 f1 00 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4 f2 f2
  0x10002736ee10: f2 f2 00 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4 f2 f2
  0x10002736ee20: f2 f2 00 f4 f4 f4 f3 f3 f3 f3 00 00 00 00 00 00
  0x10002736ee30: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==434==ABORTING
Originally created by @frank-dittrich on GitHub (Aug 29, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2246 Originally assigned to: @frank-dittrich on GitHub. ``` (bleeding-jumbo)run $ cat fail_Salted-SHA1.pw {SSHA}bPXG4M1KkwZh2Hbgnuoszvpa (bleeding-jumbo)run $ ./john --format=Salted-SHA1 fail_Salted-SHA1.pw ================================================================= ==434==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd39bb6f34 at pc 0x7f026c44dccf bp 0x7ffd39bb6ec0 sp 0x7ffd39bb6668 READ of size 4294967294 at 0x7ffd39bb6f34 thread T0 #0 0x7f026c44dcce (/lib64/libasan.so.3+0x5ecce) #1 0x72a1e0 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:217 #2 0x7a1262 in ldr_load_pw_line /home/fd/git/JtR/src/loader.c:1004 #3 0x7a23a0 in read_file /home/fd/git/JtR/src/loader.c:226 #4 0x7a57ec in ldr_load_pw_file /home/fd/git/JtR/src/loader.c:1115 #5 0x7986e3 in john_load /home/fd/git/JtR/src/john.c:1169 #6 0x799f0b in john_init /home/fd/git/JtR/src/john.c:1496 #7 0x79bdc1 in main /home/fd/git/JtR/src/john.c:1954 #8 0x7f026a963730 in __libc_start_main (/lib64/libc.so.6+0x20730) #9 0x405e38 in _start (/home/fd/git/JtR/run/john+0x405e38) Address 0x7ffd39bb6f34 is located in stack of thread T0 at offset 84 in frame #0 0x72a095 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:199 This frame has 1 object(s): [32, 84) 'realcipher' <== Memory access at offset 84 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow (/lib64/libasan.so.3+0x5ecce) Shadow bytes around the buggy address: 0x10002736ed90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002736eda0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002736edb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002736edc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002736edd0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 =>0x10002736ede0: 00 00 00 00 00 00[04]f4 f3 f3 f3 f3 00 00 00 00 0x10002736edf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 0x10002736ee00: f1 f1 00 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4 f2 f2 0x10002736ee10: f2 f2 00 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4 f2 f2 0x10002736ee20: f2 f2 00 f4 f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 0x10002736ee30: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==434==ABORTING ```
Author
Owner

@frank-dittrich commented on GitHub (Aug 29, 2016):

@jfoug your change fixed this issue, but is it correct? I don't know.

(bleeding-jumbo)src $ git grep -n CIPHERTEXT_LEN_MIN salted_sha1_*
salted_sha1_common.h:15:#define CIPHERTEXT_LEN_MIN   (BINARY_SIZE / 3 * 4)
salted_sha1_common_plug.c:61:   if (len <= CIPHERTEXT_LEN_MIN)

Now I was able to make Salted-SHA1 crash on another input file. I guess some base64 validity check is needed.

(bleeding-jumbo)run $ cat fail_Salted-SHA1.pw 
{SSHA}bPXG4M1KkwZh2Hbgnuoszvpat0T/OS86========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
(bleeding-jumbo)run $ ./john fail_Salted-SHA1.pw --format=Salted-SHA1
=================================================================
==7373==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc5e2d3644 at pc 0x7f0e23538ccf bp 0x7ffc5e2d35d0 sp 0x7ffc5e2d2d78
READ of size 4294967050 at 0x7ffc5e2d3644 thread T0
    #0 0x7f0e23538cce  (/lib64/libasan.so.3+0x5ecce)
    #1 0x72a1e0 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:217
    #2 0x7a1262 in ldr_load_pw_line /home/fd/git/JtR/src/loader.c:1004
    #3 0x7a23a0 in read_file /home/fd/git/JtR/src/loader.c:226
    #4 0x7a57ec in ldr_load_pw_file /home/fd/git/JtR/src/loader.c:1115
    #5 0x7986e3 in john_load /home/fd/git/JtR/src/john.c:1169
    #6 0x799f0b in john_init /home/fd/git/JtR/src/john.c:1496
    #7 0x79bdc1 in main /home/fd/git/JtR/src/john.c:1954
    #8 0x7f0e21a4e730 in __libc_start_main (/lib64/libc.so.6+0x20730)
    #9 0x405e38 in _start (/home/fd/git/JtR/run/john+0x405e38)

Address 0x7ffc5e2d3644 is located in stack of thread T0 at offset 84 in frame
    #0 0x72a095 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:199

  This frame has 1 object(s):
    [32, 84) 'realcipher' <== Memory access at offset 84 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow (/lib64/libasan.so.3+0x5ecce) 
Shadow bytes around the buggy address:
  0x10000bc52670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000bc52680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000bc52690: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000bc526a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000bc526b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
=>0x10000bc526c0: f1 f1 00 00 00 00 00 00[04]f4 f3 f3 f3 f3 00 00
  0x10000bc526d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000bc526e0: f1 f1 f1 f1 00 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4
  0x10000bc526f0: f2 f2 f2 f2 00 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4
  0x10000bc52700: f2 f2 f2 f2 00 f4 f4 f4 f3 f3 f3 f3 00 00 00 00
  0x10000bc52710: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==7373==ABORTING
<!-- gh-comment-id:243056880 --> @frank-dittrich commented on GitHub (Aug 29, 2016): @jfoug your change fixed this issue, but is it correct? I don't know. ``` (bleeding-jumbo)src $ git grep -n CIPHERTEXT_LEN_MIN salted_sha1_* salted_sha1_common.h:15:#define CIPHERTEXT_LEN_MIN (BINARY_SIZE / 3 * 4) salted_sha1_common_plug.c:61: if (len <= CIPHERTEXT_LEN_MIN) ``` Now I was able to make Salted-SHA1 crash on another input file. I guess some base64 validity check is needed. ``` (bleeding-jumbo)run $ cat fail_Salted-SHA1.pw {SSHA}bPXG4M1KkwZh2Hbgnuoszvpat0T/OS86======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== (bleeding-jumbo)run $ ./john fail_Salted-SHA1.pw --format=Salted-SHA1 ================================================================= ==7373==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc5e2d3644 at pc 0x7f0e23538ccf bp 0x7ffc5e2d35d0 sp 0x7ffc5e2d2d78 READ of size 4294967050 at 0x7ffc5e2d3644 thread T0 #0 0x7f0e23538cce (/lib64/libasan.so.3+0x5ecce) #1 0x72a1e0 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:217 #2 0x7a1262 in ldr_load_pw_line /home/fd/git/JtR/src/loader.c:1004 #3 0x7a23a0 in read_file /home/fd/git/JtR/src/loader.c:226 #4 0x7a57ec in ldr_load_pw_file /home/fd/git/JtR/src/loader.c:1115 #5 0x7986e3 in john_load /home/fd/git/JtR/src/john.c:1169 #6 0x799f0b in john_init /home/fd/git/JtR/src/john.c:1496 #7 0x79bdc1 in main /home/fd/git/JtR/src/john.c:1954 #8 0x7f0e21a4e730 in __libc_start_main (/lib64/libc.so.6+0x20730) #9 0x405e38 in _start (/home/fd/git/JtR/run/john+0x405e38) Address 0x7ffc5e2d3644 is located in stack of thread T0 at offset 84 in frame #0 0x72a095 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:199 This frame has 1 object(s): [32, 84) 'realcipher' <== Memory access at offset 84 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow (/lib64/libasan.so.3+0x5ecce) Shadow bytes around the buggy address: 0x10000bc52670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10000bc52680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10000bc52690: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10000bc526a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10000bc526b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 =>0x10000bc526c0: f1 f1 00 00 00 00 00 00[04]f4 f3 f3 f3 f3 00 00 0x10000bc526d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10000bc526e0: f1 f1 f1 f1 00 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4 0x10000bc526f0: f2 f2 f2 f2 00 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4 0x10000bc52700: f2 f2 f2 f2 00 f4 f4 f4 f3 f3 f3 f3 00 00 00 00 0x10000bc52710: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==7373==ABORTING ```
Author
Owner

@frank-dittrich commented on GitHub (Aug 29, 2016):

Here are other "hashes" that make Salted-SHA1 (ASan) crash.
All found using afl, see https://github.com/mirrorer/afl.

{SSHA}bPRG4M1Kh2Hbgnuoszvpat0T/kwZh2Hbgnuoszvpat0T/OS86

The first sample was the only one found prior to your fix which still caused problems after your latest change.

The others have been found when testing the latest build. It took less than 15 minutes to find the first 3 hashes. The test is still running. I might add new hashes to the list if they look different from what has been found earlier.

{SSHA}bPbPXG4M1KkwZh2HbgnuXG4M1KkwZh2HbgnuoszvpatdT/OS86
{SSHA}bPXG4M1KkwZh2Hbgnuoszvpat0T/OnuoszvpaPXG4M1KkwZh6
{SSHA}y9Nc5vOnKNc5vOnK12ppTxM12ppTjHo35lxM1pMFwqqwH6Eg==
<!-- gh-comment-id:243058178 --> @frank-dittrich commented on GitHub (Aug 29, 2016): Here are other "hashes" that make Salted-SHA1 (ASan) crash. All found using afl, see https://github.com/mirrorer/afl. ``` {SSHA}bPRG4M1Kh2Hbgnuoszvpat0T/kwZh2Hbgnuoszvpat0T/OS86 ``` The first sample was the only one found prior to your fix which still caused problems after your latest change. The others have been found when testing the latest build. It took less than 15 minutes to find the first 3 hashes. The test is still running. I might add new hashes to the list if they look different from what has been found earlier. ``` {SSHA}bPbPXG4M1KkwZh2HbgnuXG4M1KkwZh2HbgnuoszvpatdT/OS86 {SSHA}bPXG4M1KkwZh2Hbgnuoszvpat0T/OnuoszvpaPXG4M1KkwZh6 {SSHA}y9Nc5vOnKNc5vOnK12ppTxM12ppTjHo35lxM1pMFwqqwH6Eg== ```
Author
Owner

@jfoug commented on GitHub (Aug 29, 2016):

I do agree, that this does need to be done post base64-2-raw. What is being done is it is not valid to have a hash without a salt. But by tacking on a number of = signs to a shorter hash, it will always have enough base64 bytes.

I will dig deeper.

<!-- gh-comment-id:243108540 --> @jfoug commented on GitHub (Aug 29, 2016): I do agree, that this does need to be done post base64-2-raw. What is being done is it is not valid to have a hash without a salt. But by tacking on a number of = signs to a shorter hash, it will always have enough base64 bytes. I will dig deeper.
Author
Owner

@jfoug commented on GitHub (Aug 29, 2016):

425a130 Please try now. There should be no overwrites any more.

<!-- gh-comment-id:243149989 --> @jfoug commented on GitHub (Aug 29, 2016): 425a130 Please try now. There should be no overwrites any more.
Author
Owner

@frank-dittrich commented on GitHub (Aug 29, 2016):

@jfoug

(bleeding-jumbo)run $ cat fail_Salted-SHA1.pw 
{SSHA}bPXG4M1KkwZh2Hbgnuoszvpat0T/OS86========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
(bleeding-jumbo)run $ ./john --format=Salted-SHA1 fail_Salted-SHA1.pw 
=================================================================
==10215==ERROR: AddressSanitizer: unknown-crash on address 0x80002fe6977e at pc 0x7fe94a9eaccf bp 0x7fff2fe69820 sp 0x7fff2fe68fc8
READ of size 4294967050 at 0x80002fe6977e thread T0
    #0 0x7fe94a9eacce  (/lib64/libasan.so.3+0x5ecce)
    #1 0x72a342 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:217
    #2 0x7a137b in ldr_load_pw_line /home/fd/git/JtR/src/loader.c:1004
    #3 0x7a24bb in read_file /home/fd/git/JtR/src/loader.c:226
    #4 0x7a5907 in ldr_load_pw_file /home/fd/git/JtR/src/loader.c:1115
    #5 0x79894d in john_load /home/fd/git/JtR/src/john.c:1169
    #6 0x79a175 in john_init /home/fd/git/JtR/src/john.c:1496
    #7 0x79bfc3 in main /home/fd/git/JtR/src/john.c:1954
    #8 0x7fe948f00730 in __libc_start_main (/lib64/libc.so.6+0x20730)
    #9 0x405df8 in _start (/home/fd/git/JtR/run/john+0x405df8)

==10215==AddressSanitizer CHECK failed: ../../../../libsanitizer/asan/asan_report.cc:346 "((0 && "Address is not in memory and not in shadow?")) != (0)" (0x0, 0x0)
    #0 0x7fe94aa5c76a  (/lib64/libasan.so.3+0xd076a)
    #1 0x7fe94aa63123 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/lib64/libasan.so.3+0xd7123)
    #2 0x7fe94aa576e7  (/lib64/libasan.so.3+0xcb6e7)
    #3 0x7fe94aa586f8  (/lib64/libasan.so.3+0xcc6f8)
    #4 0x7fe94aa5bbc9  (/lib64/libasan.so.3+0xcfbc9)
    #5 0x7fe94a9eaced  (/lib64/libasan.so.3+0x5eced)
    #6 0x72a342 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:217
    #7 0x7a137b in ldr_load_pw_line /home/fd/git/JtR/src/loader.c:1004
    #8 0x7a24bb in read_file /home/fd/git/JtR/src/loader.c:226
    #9 0x7a5907 in ldr_load_pw_file /home/fd/git/JtR/src/loader.c:1115
    #10 0x79894d in john_load /home/fd/git/JtR/src/john.c:1169
    #11 0x79a175 in john_init /home/fd/git/JtR/src/john.c:1496
    #12 0x79bfc3 in main /home/fd/git/JtR/src/john.c:1954
    #13 0x7fe948f00730 in __libc_start_main (/lib64/libc.so.6+0x20730)
    #14 0x405df8 in _start (/home/fd/git/JtR/run/john+0x405df8)

<!-- gh-comment-id:243181061 --> @frank-dittrich commented on GitHub (Aug 29, 2016): @jfoug ``` (bleeding-jumbo)run $ cat fail_Salted-SHA1.pw {SSHA}bPXG4M1KkwZh2Hbgnuoszvpat0T/OS86======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== (bleeding-jumbo)run $ ./john --format=Salted-SHA1 fail_Salted-SHA1.pw ================================================================= ==10215==ERROR: AddressSanitizer: unknown-crash on address 0x80002fe6977e at pc 0x7fe94a9eaccf bp 0x7fff2fe69820 sp 0x7fff2fe68fc8 READ of size 4294967050 at 0x80002fe6977e thread T0 #0 0x7fe94a9eacce (/lib64/libasan.so.3+0x5ecce) #1 0x72a342 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:217 #2 0x7a137b in ldr_load_pw_line /home/fd/git/JtR/src/loader.c:1004 #3 0x7a24bb in read_file /home/fd/git/JtR/src/loader.c:226 #4 0x7a5907 in ldr_load_pw_file /home/fd/git/JtR/src/loader.c:1115 #5 0x79894d in john_load /home/fd/git/JtR/src/john.c:1169 #6 0x79a175 in john_init /home/fd/git/JtR/src/john.c:1496 #7 0x79bfc3 in main /home/fd/git/JtR/src/john.c:1954 #8 0x7fe948f00730 in __libc_start_main (/lib64/libc.so.6+0x20730) #9 0x405df8 in _start (/home/fd/git/JtR/run/john+0x405df8) ==10215==AddressSanitizer CHECK failed: ../../../../libsanitizer/asan/asan_report.cc:346 "((0 && "Address is not in memory and not in shadow?")) != (0)" (0x0, 0x0) #0 0x7fe94aa5c76a (/lib64/libasan.so.3+0xd076a) #1 0x7fe94aa63123 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/lib64/libasan.so.3+0xd7123) #2 0x7fe94aa576e7 (/lib64/libasan.so.3+0xcb6e7) #3 0x7fe94aa586f8 (/lib64/libasan.so.3+0xcc6f8) #4 0x7fe94aa5bbc9 (/lib64/libasan.so.3+0xcfbc9) #5 0x7fe94a9eaced (/lib64/libasan.so.3+0x5eced) #6 0x72a342 in get_salt /home/fd/git/JtR/src/salted_sha1_fmt_plug.c:217 #7 0x7a137b in ldr_load_pw_line /home/fd/git/JtR/src/loader.c:1004 #8 0x7a24bb in read_file /home/fd/git/JtR/src/loader.c:226 #9 0x7a5907 in ldr_load_pw_file /home/fd/git/JtR/src/loader.c:1115 #10 0x79894d in john_load /home/fd/git/JtR/src/john.c:1169 #11 0x79a175 in john_init /home/fd/git/JtR/src/john.c:1496 #12 0x79bfc3 in main /home/fd/git/JtR/src/john.c:1954 #13 0x7fe948f00730 in __libc_start_main (/lib64/libc.so.6+0x20730) #14 0x405df8 in _start (/home/fd/git/JtR/run/john+0x405df8) ```
Author
Owner

@jfoug commented on GitHub (Aug 29, 2016):

Tag, your it. b4648de

I stopped all length checking (other than some 'sanity' checking), of the base-64 stuff. The new code decodes to raw, using the 'new' better functions, and then uses the length returned there.

<!-- gh-comment-id:243191008 --> @jfoug commented on GitHub (Aug 29, 2016): Tag, your it. b4648de I stopped all length checking (other than some 'sanity' checking), of the base-64 stuff. The new code decodes to raw, using the 'new' better functions, and then uses the length returned there.
Author
Owner

@frank-dittrich commented on GitHub (Aug 29, 2016):

@jfoug Fixed, thanks.

<!-- gh-comment-id:243215514 --> @frank-dittrich commented on GitHub (Aug 29, 2016): @jfoug Fixed, thanks.
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#1503
No description provided.