[GH-ISSUE #971] EncFS format: asan error in pbkdf2_hmac_sha1.h:291 #571

Closed
opened 2026-10-14 03:13:48 +07:00 by bsakaguchi · 0 comments
Owner

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

(bleeding-jumbo)run $ cat fail/fail_EncFS.pw 
$encfs$-256*120918*0*20*e6eb9a85ee1c348bc2b507b07680f4f220caa763*52*9f75473ade3887bca7a7bb113fbc518ffffba631326a19c1e7823b4564ae5c0d1e4c7e4aec66d16924fa4c341cd52903cc75eec4
(bleeding-jumbo)run $ OMP_NUM_THREADS=1 ./john --skip-self-tests fail/fail_EncFS.pw 
Loaded 1 password hash (EncFS [PBKDF2-SHA1 AES/Blowfish 8x SSE2])
Warning: OpenMP is disabled; a non-OpenMP build may be faster
Press 'q' or Ctrl-C to abort, almost any other key for status
=================================================================
==868== ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff591eca70 at pc 0x5cd588 bp 0x7fff591eb150 sp 0x7fff591eb140
WRITE of size 1 at 0x7fff591eca70 thread T0
    #0 0x5cd587 (/home/fd/git/JtR/run/john+0x5cd587)
    #1 0x5cec98 (/home/fd/git/JtR/run/john+0x5cec98)
    #2 0x760a28 (/home/fd/git/JtR/run/john+0x760a28)
    #3 0x7625a5 (/home/fd/git/JtR/run/john+0x7625a5)
    #4 0x762770 (/home/fd/git/JtR/run/john+0x762770)
    #5 0x7af98a (/home/fd/git/JtR/run/john+0x7af98a)
    #6 0x74ecb2 (/home/fd/git/JtR/run/john+0x74ecb2)
    #7 0x775b1d (/home/fd/git/JtR/run/john+0x775b1d)
    #8 0x776669 (/home/fd/git/JtR/run/john+0x776669)
    #9 0x38dd621d64 (/usr/lib64/libc-2.18.so+0x21d64)
    #10 0x4065b4 (/home/fd/git/JtR/run/john+0x4065b4)
Address 0x7fff591eca70 is located at offset 6048 in frame <crypt_all._omp_fn.0> of T0's stack:
  This frame has 24 object(s):
    [32, 33) 'loop'
    [96, 100) 'dstLen'
    [160, 164) 'mdLen'
    [224, 232) 'h'
    [288, 308) 'ivec'
    [352, 384) 'len'
    [416, 480) 'pin'
    [512, 576) 'pout'
    [608, 672) 'ipad'
    [704, 768) 'opad'
    [800, 864) 'md'
    [896, 992) 'ctx'
    [1024, 1120) 'ctx'
    [1152, 1280) 'tmpBuf'
    [1312, 1472) 'dgst'
    [1504, 1664) 'sse_crypt1'
    [1696, 1856) 'sse_crypt2'
    [1888, 2056) 'stream_dec'
    [2112, 2400) 'mac_ctx'
    [2432, 2848) 'master'
    [2880, 3392) 'sse_hash1'
    [3424, 4192) 'ipad'
    [4224, 4992) 'opad'
    [5024, 6048) 'out'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
Shadow bytes around the buggy address:
  0x10006b2358f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10006b235900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10006b235910: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10006b235920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10006b235930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x10006b235940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[f3]f3
  0x10006b235950: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10006b235960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10006b235970: 00 00 f1 f1 f1 f1 04 f4 f4 f4 f2 f2 f2 f2 00 f4
  0x10006b235980: f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
  0x10006b235990: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 righ 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
  ASan internal:         fe
==868== ABORTING
(bleeding-jumbo)run $ ./asan_symbolize.py 
    #0 0x5cd587 (/home/fd/git/JtR/run/john+0x5cd587)
    #1 0x5cec98 (/home/fd/git/JtR/run/john+0x5cec98)
    #2 0x760a28 (/home/fd/git/JtR/run/john+0x760a28)
    #3 0x7625a5 (/home/fd/git/JtR/run/john+0x7625a5)
    #4 0x762770 (/home/fd/git/JtR/run/john+0x762770)
    #5 0x7af98a (/home/fd/git/JtR/run/john+0x7af98a)
    #6 0x74ecb2 (/home/fd/git/JtR/run/john+0x74ecb2)
    #7 0x775b1d (/home/fd/git/JtR/run/john+0x775b1d)
    #8 0x776669 (/home/fd/git/JtR/run/john+0x776669)
    #9 0x38dd621d64 (/usr/lib64/libc-2.18.so+0x21d64)
    #10 0x4065b4 (/home/fd/git/JtR/run/john+0x4065b4)
llvm-symbolizer: for the -functions option: 'short' is invalid value for boolean argument! Try 0 or 1
    #0 0x5cd587 in pbkdf2_sha1_sse /home/fd/git/JtR/src/pbkdf2_hmac_sha1.h:291
    #1 0x5cec98 in crypt_all /home/fd/git/JtR/src/encfs_fmt_plug.c:398
    #2 0x760a28 in crk_password_loop /home/fd/git/JtR/src/cracker.c:685
    #3 0x7625a5 in crk_salt_loop /home/fd/git/JtR/src/cracker.c:743
    #4 0x762770 in crk_process_key /home/fd/git/JtR/src/cracker.c:780
    #5 0x7af98a in do_wordlist_crack /home/fd/git/JtR/src/wordlist.c:1227 (discriminator 1)
    #6 0x74ecb2 in do_wordlist_pass /home/fd/git/JtR/src/batch.c:38
    #7 0x775b1d in john_run /home/fd/git/JtR/src/john.c:1379
    #8 0x776669 in main /home/fd/git/JtR/src/john.c:1651
    #9 0x38dd621d64 in ?? ??:0
    #10 0x4065b4 in _start ??:?
Originally created by @frank-dittrich on GitHub (Dec 30, 2014). Original GitHub issue: https://github.com/openwall/john/issues/971 ``` (bleeding-jumbo)run $ cat fail/fail_EncFS.pw $encfs$-256*120918*0*20*e6eb9a85ee1c348bc2b507b07680f4f220caa763*52*9f75473ade3887bca7a7bb113fbc518ffffba631326a19c1e7823b4564ae5c0d1e4c7e4aec66d16924fa4c341cd52903cc75eec4 (bleeding-jumbo)run $ OMP_NUM_THREADS=1 ./john --skip-self-tests fail/fail_EncFS.pw Loaded 1 password hash (EncFS [PBKDF2-SHA1 AES/Blowfish 8x SSE2]) Warning: OpenMP is disabled; a non-OpenMP build may be faster Press 'q' or Ctrl-C to abort, almost any other key for status ================================================================= ==868== ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff591eca70 at pc 0x5cd588 bp 0x7fff591eb150 sp 0x7fff591eb140 WRITE of size 1 at 0x7fff591eca70 thread T0 #0 0x5cd587 (/home/fd/git/JtR/run/john+0x5cd587) #1 0x5cec98 (/home/fd/git/JtR/run/john+0x5cec98) #2 0x760a28 (/home/fd/git/JtR/run/john+0x760a28) #3 0x7625a5 (/home/fd/git/JtR/run/john+0x7625a5) #4 0x762770 (/home/fd/git/JtR/run/john+0x762770) #5 0x7af98a (/home/fd/git/JtR/run/john+0x7af98a) #6 0x74ecb2 (/home/fd/git/JtR/run/john+0x74ecb2) #7 0x775b1d (/home/fd/git/JtR/run/john+0x775b1d) #8 0x776669 (/home/fd/git/JtR/run/john+0x776669) #9 0x38dd621d64 (/usr/lib64/libc-2.18.so+0x21d64) #10 0x4065b4 (/home/fd/git/JtR/run/john+0x4065b4) Address 0x7fff591eca70 is located at offset 6048 in frame <crypt_all._omp_fn.0> of T0's stack: This frame has 24 object(s): [32, 33) 'loop' [96, 100) 'dstLen' [160, 164) 'mdLen' [224, 232) 'h' [288, 308) 'ivec' [352, 384) 'len' [416, 480) 'pin' [512, 576) 'pout' [608, 672) 'ipad' [704, 768) 'opad' [800, 864) 'md' [896, 992) 'ctx' [1024, 1120) 'ctx' [1152, 1280) 'tmpBuf' [1312, 1472) 'dgst' [1504, 1664) 'sse_crypt1' [1696, 1856) 'sse_crypt2' [1888, 2056) 'stream_dec' [2112, 2400) 'mac_ctx' [2432, 2848) 'master' [2880, 3392) 'sse_hash1' [3424, 4192) 'ipad' [4224, 4992) 'opad' [5024, 6048) 'out' HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) Shadow bytes around the buggy address: 0x10006b2358f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006b235900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006b235910: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006b235920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006b235930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x10006b235940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[f3]f3 0x10006b235950: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006b235960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006b235970: 00 00 f1 f1 f1 f1 04 f4 f4 f4 f2 f2 f2 f2 00 f4 0x10006b235980: f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 0x10006b235990: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 righ 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 ASan internal: fe ==868== ABORTING (bleeding-jumbo)run $ ./asan_symbolize.py #0 0x5cd587 (/home/fd/git/JtR/run/john+0x5cd587) #1 0x5cec98 (/home/fd/git/JtR/run/john+0x5cec98) #2 0x760a28 (/home/fd/git/JtR/run/john+0x760a28) #3 0x7625a5 (/home/fd/git/JtR/run/john+0x7625a5) #4 0x762770 (/home/fd/git/JtR/run/john+0x762770) #5 0x7af98a (/home/fd/git/JtR/run/john+0x7af98a) #6 0x74ecb2 (/home/fd/git/JtR/run/john+0x74ecb2) #7 0x775b1d (/home/fd/git/JtR/run/john+0x775b1d) #8 0x776669 (/home/fd/git/JtR/run/john+0x776669) #9 0x38dd621d64 (/usr/lib64/libc-2.18.so+0x21d64) #10 0x4065b4 (/home/fd/git/JtR/run/john+0x4065b4) llvm-symbolizer: for the -functions option: 'short' is invalid value for boolean argument! Try 0 or 1 #0 0x5cd587 in pbkdf2_sha1_sse /home/fd/git/JtR/src/pbkdf2_hmac_sha1.h:291 #1 0x5cec98 in crypt_all /home/fd/git/JtR/src/encfs_fmt_plug.c:398 #2 0x760a28 in crk_password_loop /home/fd/git/JtR/src/cracker.c:685 #3 0x7625a5 in crk_salt_loop /home/fd/git/JtR/src/cracker.c:743 #4 0x762770 in crk_process_key /home/fd/git/JtR/src/cracker.c:780 #5 0x7af98a in do_wordlist_crack /home/fd/git/JtR/src/wordlist.c:1227 (discriminator 1) #6 0x74ecb2 in do_wordlist_pass /home/fd/git/JtR/src/batch.c:38 #7 0x775b1d in john_run /home/fd/git/JtR/src/john.c:1379 #8 0x776669 in main /home/fd/git/JtR/src/john.c:1651 #9 0x38dd621d64 in ?? ??:0 #10 0x4065b4 in _start ??:? ```
bsakaguchi 2026-10-14 03:13:48 +07:00
  • closed this issue
  • added the
    bug
    label
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#571
No description provided.