[GH-ISSUE #945] Mask mode ASAN crash #546

Closed
opened 2026-10-14 03:12:40 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @magnumripper on GitHub (Dec 23, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/945

Originally assigned to: @sayan1an on GitHub.

$ ../run/john LinkedIn.txt -form:raw-sha1-linkedin -ses:li -mask:?a -min-len=0 -max-len=3
Loaded 3521180 password hashes with no different salts (Raw-SHA1-Linkedin [SHA1 128/128 AVX 8x])
Warning: no OpenMP support for this hash type, consider --fork=8
=================================================================
==27085==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000109ba at pc 0x104bc0f18 bp 0x7fff5b467670 sp 0x7fff5b467668
WRITE of size 1 at 0x6020000109ba thread T0
    #0 0x104bc0f17 in stretch_mask mask.c:1472
    #1 0x104bc2016 in mask_init mask.c:1586
    #2 0x104bab89d in john_run john.c:1352
    #3 0x104bacaab in main john.c:1651
    #4 0x7fff908145c8 in start (in libdyld.dylib) + 0
    #5 0x6

0x6020000109ba is located 0 bytes to the right of 10-byte region [0x6020000109b0,0x6020000109ba)
allocated by thread T0 here:
    #0 0x105f1db96 in wrap_malloc (in libasan.1.dylib) + 118
    #1 0x104bc0b2a in stretch_mask mask.c:1431
    #2 0x104bc2016 in mask_init mask.c:1586
    #3 0x104bab89d in john_run john.c:1352
    #4 0x104bacaab in main john.c:1651
    #5 0x7fff908145c8 in start (in libdyld.dylib) + 0
    #6 0x6

SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 ??
Shadow bytes around the buggy address:
  0x1c04000020e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c04000020f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0400002100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0400002110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0400002120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x1c0400002130: fa fa fa fa fa fa 00[02]fa fa fd fa fa fa 00 00
  0x1c0400002140: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
  0x1c0400002150: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
  0x1c0400002160: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
  0x1c0400002170: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
  0x1c0400002180: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 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
  Contiguous container OOB:fc
  ASan internal:           fe
==27085==ABORTING
Originally created by @magnumripper on GitHub (Dec 23, 2014). Original GitHub issue: https://github.com/openwall/john/issues/945 Originally assigned to: @sayan1an on GitHub. ``` $ ../run/john LinkedIn.txt -form:raw-sha1-linkedin -ses:li -mask:?a -min-len=0 -max-len=3 Loaded 3521180 password hashes with no different salts (Raw-SHA1-Linkedin [SHA1 128/128 AVX 8x]) Warning: no OpenMP support for this hash type, consider --fork=8 ================================================================= ==27085==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000109ba at pc 0x104bc0f18 bp 0x7fff5b467670 sp 0x7fff5b467668 WRITE of size 1 at 0x6020000109ba thread T0 #0 0x104bc0f17 in stretch_mask mask.c:1472 #1 0x104bc2016 in mask_init mask.c:1586 #2 0x104bab89d in john_run john.c:1352 #3 0x104bacaab in main john.c:1651 #4 0x7fff908145c8 in start (in libdyld.dylib) + 0 #5 0x6 0x6020000109ba is located 0 bytes to the right of 10-byte region [0x6020000109b0,0x6020000109ba) allocated by thread T0 here: #0 0x105f1db96 in wrap_malloc (in libasan.1.dylib) + 118 #1 0x104bc0b2a in stretch_mask mask.c:1431 #2 0x104bc2016 in mask_init mask.c:1586 #3 0x104bab89d in john_run john.c:1352 #4 0x104bacaab in main john.c:1651 #5 0x7fff908145c8 in start (in libdyld.dylib) + 0 #6 0x6 SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 ?? Shadow bytes around the buggy address: 0x1c04000020e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c04000020f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0400002100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0400002110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0400002120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x1c0400002130: fa fa fa fa fa fa 00[02]fa fa fd fa fa fa 00 00 0x1c0400002140: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00 0x1c0400002150: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00 0x1c0400002160: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00 0x1c0400002170: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00 0x1c0400002180: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 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 Contiguous container OOB:fc ASan internal: fe ==27085==ABORTING ```
bsakaguchi 2026-10-14 03:12:40 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@sayan1an commented on GitHub (Dec 23, 2014):

Fixed cc91f7555e.

How can I turn on ASAN ? Pretty useful indeed!

<!-- gh-comment-id:67952400 --> @sayan1an commented on GitHub (Dec 23, 2014): Fixed cc91f7555e9efb. How can I turn on ASAN ? Pretty useful indeed!
Author
Owner

@jfoug commented on GitHub (Dec 23, 2014):

./configure --enable-asan

<!-- gh-comment-id:67959202 --> @jfoug commented on GitHub (Dec 23, 2014): ./configure --enable-asan
Author
Owner

@jfoug commented on GitHub (Dec 23, 2014):

Read the./doc/AddressSanitizer-HOWTO.txt

There is a python file that 'may' be needed to turn the output into the pretty output with file/line. I need if for the version of compiler I use. Others get the proper file/line information within the dump message itself. It IS useful, and so far, what it has found has been real. On big thing we see is reading data outside of bounds, but it catches many other things. The OS often will catch writing outside of bounds (with a core). Reading is another story, and this thing does a good job of it. Also, tiny buffer overflows and small overflows on the stack usually are not caught easily, but this tools catches them.

<!-- gh-comment-id:67959600 --> @jfoug commented on GitHub (Dec 23, 2014): Read the./doc/AddressSanitizer-HOWTO.txt There is a python file that 'may' be needed to turn the output into the pretty output with file/line. I need if for the version of compiler I use. Others get the proper file/line information within the dump message itself. It IS useful, and so far, what it has found has been real. On big thing we see is reading data outside of bounds, but it catches many other things. The OS often will catch writing outside of bounds (with a core). Reading is another story, and this thing does a good job of it. Also, tiny buffer overflows and small overflows on the stack usually are not caught easily, but this tools catches them.
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#546
No description provided.