[GH-ISSUE #2702] ASAN error detected on pgpwde [PGP WDE S2K-SHA1 64] format #1744

Closed
opened 2026-10-15 04:23:57 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ghost on GitHub (Aug 25, 2017).
Original GitHub issue: https://github.com/openwall/john/issues/2702

Testing: pgpwde [PGP WDE S2K-SHA1 64]... (4xOMP) =================================================================
==13468== ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x7fff38ee2ea0,0x7fff38ee2ee3) and [0x7fff38ee2edd, 0x7fff38ee2f20) overlap
    #0 0x7fb5e6816355 (/usr/lib/x86_64-linux-gnu/libasan.so.0+0xe355)
    #1 0x823eb3 in memcpy /usr/include/x86_64-linux-gnu/bits/string3.h:51
    #2 0x823eb3 in PKCS1oaepMGF1Unpack /home/travis/build/claudioandre/JohnTheRipper/src/pgpwde_fmt_plug.c:153
    #3 0x82476d in pgpwde_decrypt_and_verify /home/travis/build/claudioandre/JohnTheRipper/src/pgpwde_fmt_plug.c:211
    #4 0x8248c9 in crypt_all._omp_fn.0 /home/travis/build/claudioandre/JohnTheRipper/src/pgpwde_fmt_plug.c:344
    #5 0x824a4c in crypt_all /home/travis/build/claudioandre/JohnTheRipper/src/pgpwde_fmt_plug.c:333
    #6 0x8ec4d9 in is_key_right /home/travis/build/claudioandre/JohnTheRipper/src/formats.c:208
    #7 0x8ed4da in test_fmt_8_bit /home/travis/build/claudioandre/JohnTheRipper/src/formats.c:1162
    #8 0x8f0ee2 in fmt_self_test_body /home/travis/build/claudioandre/JohnTheRipper/src/formats.c:872
    #9 0x8f2d1a in fmt_self_test /home/travis/build/claudioandre/JohnTheRipper/src/formats.c:1667
    #10 0x8d192d in benchmark_format /home/travis/build/claudioandre/JohnTheRipper/src/bench.c:367
    #11 0x8d3761 in benchmark_all /home/travis/build/claudioandre/JohnTheRipper/src/bench.c:809
    #12 0x9011e8 in john_run /home/travis/build/claudioandre/JohnTheRipper/src/john.c:1602
    #13 0x902988 in main /home/travis/build/claudioandre/JohnTheRipper/src/john.c:1992
    #14 0x7fb5e4a11f44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44)
    #15 0x4066f2 in _start (/home/travis/build/claudioandre/JohnTheRipper/run/john+0x4066f2)
Address 0x7fff38ee2ea0 is located at offset 608 in frame <pgpwde_decrypt_and_verify> of T0's stack:
  This frame has 5 object(s):
    [32, 36) 'length'
    [96, 340) 'aes_key'
    [384, 400) 'iv'
    [448, 576) 'out'
    [608, 736) 'msg'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
Address 0x7fff38ee2edd is located at offset 669 in frame <pgpwde_decrypt_and_verify> of T0's stack:
  This frame has 5 object(s):
    [32, 36) 'length'
    [96, 340) 'aes_key'
    [384, 400) 'iv'
    [448, 576) 'out'
    [608, 736) 'msg'
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: memcpy-param-overlap ??:0 ??
==13468== ABORTING
Originally created by @ghost on GitHub (Aug 25, 2017). Original GitHub issue: https://github.com/openwall/john/issues/2702 ``` Testing: pgpwde [PGP WDE S2K-SHA1 64]... (4xOMP) ================================================================= ==13468== ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x7fff38ee2ea0,0x7fff38ee2ee3) and [0x7fff38ee2edd, 0x7fff38ee2f20) overlap #0 0x7fb5e6816355 (/usr/lib/x86_64-linux-gnu/libasan.so.0+0xe355) #1 0x823eb3 in memcpy /usr/include/x86_64-linux-gnu/bits/string3.h:51 #2 0x823eb3 in PKCS1oaepMGF1Unpack /home/travis/build/claudioandre/JohnTheRipper/src/pgpwde_fmt_plug.c:153 #3 0x82476d in pgpwde_decrypt_and_verify /home/travis/build/claudioandre/JohnTheRipper/src/pgpwde_fmt_plug.c:211 #4 0x8248c9 in crypt_all._omp_fn.0 /home/travis/build/claudioandre/JohnTheRipper/src/pgpwde_fmt_plug.c:344 #5 0x824a4c in crypt_all /home/travis/build/claudioandre/JohnTheRipper/src/pgpwde_fmt_plug.c:333 #6 0x8ec4d9 in is_key_right /home/travis/build/claudioandre/JohnTheRipper/src/formats.c:208 #7 0x8ed4da in test_fmt_8_bit /home/travis/build/claudioandre/JohnTheRipper/src/formats.c:1162 #8 0x8f0ee2 in fmt_self_test_body /home/travis/build/claudioandre/JohnTheRipper/src/formats.c:872 #9 0x8f2d1a in fmt_self_test /home/travis/build/claudioandre/JohnTheRipper/src/formats.c:1667 #10 0x8d192d in benchmark_format /home/travis/build/claudioandre/JohnTheRipper/src/bench.c:367 #11 0x8d3761 in benchmark_all /home/travis/build/claudioandre/JohnTheRipper/src/bench.c:809 #12 0x9011e8 in john_run /home/travis/build/claudioandre/JohnTheRipper/src/john.c:1602 #13 0x902988 in main /home/travis/build/claudioandre/JohnTheRipper/src/john.c:1992 #14 0x7fb5e4a11f44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44) #15 0x4066f2 in _start (/home/travis/build/claudioandre/JohnTheRipper/run/john+0x4066f2) Address 0x7fff38ee2ea0 is located at offset 608 in frame <pgpwde_decrypt_and_verify> of T0's stack: This frame has 5 object(s): [32, 36) 'length' [96, 340) 'aes_key' [384, 400) 'iv' [448, 576) 'out' [608, 736) 'msg' HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) Address 0x7fff38ee2edd is located at offset 669 in frame <pgpwde_decrypt_and_verify> of T0's stack: This frame has 5 object(s): [32, 36) 'length' [96, 340) 'aes_key' [384, 400) 'iv' [448, 576) 'out' [608, 736) 'msg' 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: memcpy-param-overlap ??:0 ?? ==13468== ABORTING ```
Author
Owner

@kholia commented on GitHub (Aug 26, 2017):

Thanks for catching this. PR #2703 should fix it.

<!-- gh-comment-id:325079932 --> @kholia commented on GitHub (Aug 26, 2017): Thanks for catching this. PR #2703 should fix it.
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#1744
No description provided.