[GH-ISSUE #1362] External mode: Floating point exception #861

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

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

Originally assigned to: @loverszhaokai on GitHub.

#1. Reproduce

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

$apr1$a2Jqm...$grFrwEgiQleDr0zR4Jx1b.

$ cat local.conf

[List.External:Lanman]

void init()
{
    int i;

    i/= 0;
}

void generate()
{
}


void restore()
{
}

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

Floating point exception

#2. GDB debug

$ set args test_pw --format=md5crypt --external=lanman --config=local.conf
$ r

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGFPE, Arithmetic exception.
0x00000000005c1660 in c_execute_fast (addr=<optimized out>) at compiler.c:1137
1137        imm = *(sp - 3)->mem /= imm;
(gdb) bt
#0  0x00000000005c1660 in c_execute_fast (addr=<optimized out>) at compiler.c:1137
#1  0x00000000005c53a2 in ext_init (mode=0x10c712d "lanman", db=<optimized out>) at external.c:190
#2  0x00000000005ccec4 in john_load () at john.c:922
#3  0x00000000005cda86 in john_init (name=0x7fffffffec32 "john", argc=5, argv=0x7fffffffe988) at john.c:1280
#4  0x00000000005ce772 in main (argc=5, argv=0x7fffffffe988) at john.c:1707
Originally created by @loverszhaokai on GitHub (May 27, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1362 Originally assigned to: @loverszhaokai on GitHub. #1. Reproduce $ ./configure && make -sj8 $ cat test_pw ``` $apr1$a2Jqm...$grFrwEgiQleDr0zR4Jx1b. ``` $ cat local.conf ``` [List.External:Lanman] void init() { int i; i/= 0; } void generate() { } void restore() { } ``` $ ../john test_pw --format=md5crypt --external=lanman --config=local.conf ``` Floating point exception ``` #2. GDB debug $ set args test_pw --format=md5crypt --external=lanman --config=local.conf $ r ``` C [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGFPE, Arithmetic exception. 0x00000000005c1660 in c_execute_fast (addr=<optimized out>) at compiler.c:1137 1137 imm = *(sp - 3)->mem /= imm; (gdb) bt #0 0x00000000005c1660 in c_execute_fast (addr=<optimized out>) at compiler.c:1137 #1 0x00000000005c53a2 in ext_init (mode=0x10c712d "lanman", db=<optimized out>) at external.c:190 #2 0x00000000005ccec4 in john_load () at john.c:922 #3 0x00000000005cda86 in john_init (name=0x7fffffffec32 "john", argc=5, argv=0x7fffffffe988) at john.c:1280 #4 0x00000000005ce772 in main (argc=5, argv=0x7fffffffe988) at john.c:1707 ```
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/30/12

<!-- gh-comment-id:154888492 --> @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#861
No description provided.