[GH-ISSUE #1364] External mode: asan error SegFault 2 #860

Closed
opened 2026-10-14 03:26:10 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @loverszhaokai on GitHub (May 27, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1364

Originally assigned to: @loverszhaokai on GitHub.

#1. Analysis

This bug is similar to https://github.com/magnumripper/JohnTheRipper/issues/1358
The different is that this bug points to compiler.c:1112 while #1358 points to compiler.c:1107
If #1358 is solved, this bug maybe solved too.
#2. Reproduce

$ ./configure --enable-asan && make -sj8
$ cat test_pw

$apr1$a2Jqm...$grFrwEgiQleDr0zR4Jx1b.

$ cat local.conf

[List.External:lanman]
int maxlength;      // Maximum password length to try
int startchar, endchar; // Range of characters (inclusive)

void init()
{
    int i;

    startchar = ' '+    // Start with space
    endchar = '~';      // End with e first word, honoring --min-len
}

void generate()
{
}

void restore()
{
}

$ ../john test_pw --format=md5crypt --external=lanman --config=local.conf

ASAN:SIGSEGV
=================================================================
==129971==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000727511 sp 0x7ffea16c63f0 bp 0x7ffea16c63f0 T0)
    #0 0x727510 in c_execute_fast /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/compiler.c:1112
    #1 0x72f5d9 in ext_init /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/external.c:190
    #2 0x73f024 in john_load /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/john.c:922
    #3 0x741149 in john_init /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/john.c:1280
    #4 0x742ca5 in main /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/john.c:1707
    #5 0x7f972ebcfec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4)
    #6 0x406c72 (/home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/run/john+0x406c72)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/compiler.c:1112 c_execute_fast
==129971==ABORTING
Aborted
Originally created by @loverszhaokai on GitHub (May 27, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1364 Originally assigned to: @loverszhaokai on GitHub. #1. Analysis This bug is similar to https://github.com/magnumripper/JohnTheRipper/issues/1358 The different is that this bug points to **compiler.c:1112** while #1358 points to **compiler.c:1107** If #1358 is solved, this bug maybe solved too. #2. Reproduce $ ./configure --enable-asan && make -sj8 $ cat test_pw ``` $apr1$a2Jqm...$grFrwEgiQleDr0zR4Jx1b. ``` $ cat local.conf ``` C [List.External:lanman] int maxlength; // Maximum password length to try int startchar, endchar; // Range of characters (inclusive) void init() { int i; startchar = ' '+ // Start with space endchar = '~'; // End with e first word, honoring --min-len } void generate() { } void restore() { } ``` $ ../john test_pw --format=md5crypt --external=lanman --config=local.conf ``` C ASAN:SIGSEGV ================================================================= ==129971==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000727511 sp 0x7ffea16c63f0 bp 0x7ffea16c63f0 T0) #0 0x727510 in c_execute_fast /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/compiler.c:1112 #1 0x72f5d9 in ext_init /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/external.c:190 #2 0x73f024 in john_load /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/john.c:922 #3 0x741149 in john_init /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/john.c:1280 #4 0x742ca5 in main /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/john.c:1707 #5 0x7f972ebcfec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) #6 0x406c72 (/home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/run/john+0x406c72) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /home/zhaokai/WorkSpace/open_wall/JohnTheRipper_kai/src/compiler.c:1112 c_execute_fast ==129971==ABORTING Aborted ```
bsakaguchi 2026-10-14 03:26:10 +07:00
Author
Owner

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

http://www.openwall.com/lists/john-dev/2015/05/27/4

<!-- gh-comment-id:154888169 --> @magnumripper commented on GitHub (Nov 9, 2015): http://www.openwall.com/lists/john-dev/2015/05/27/4
Author
Owner

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

http://www.openwall.com/lists/john-dev/2015/05/30/12

<!-- gh-comment-id:154888695 --> @magnumripper commented on GitHub (Nov 9, 2015): http://www.openwall.com/lists/john-dev/2015/05/30/12
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#860
No description provided.