mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1111] Segfault in raw-sha1-ng on OpenBSD 5.6 (x86-64) #692
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#692
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @magnumripper on GitHub (Mar 17, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1111
Segfaults with --test
but not when run alone. Likely some format prior to it that breaks something.Seen on OpenBSD (x86-64)
@magnumripper commented on GitHub (Mar 17, 2015):
@magnumripper commented on GitHub (Mar 17, 2015):
This is just weird. Maybe its strrchr is totally fuked up? There is a 0x80 in the string, yet strrchr seems to have returned NULL.
@jfoug commented on GitHub (Mar 17, 2015):
I am seeing this on linux-32 bit build also (since our memory changes)
Testing: Raw-SHA384 [SHA384 128/128 SSE4.1 2x]... (2xOMP) PASS
Testing: Raw-SHA512-ng [SHA512 128/128 SSSE3 2x]... (2xOMP) Segmentation fault (core dumped)
SHA1-ng does not run on this 32 bit VM (does not do SSSE4.1)
@magnumripper commented on GitHub (Mar 17, 2015):
SHA1-ng should work fine with just SSE2 as far as I can see. It emulates newer intrinsics if needed. BTW all other formats pass on that OpenBSD machine.
@jfoug commented on GitHub (Mar 17, 2015):
Found the problem in raw-sha512-ng. It required aligned allocation. It probably simply just did not show up before, since so much was done with alloc_tiny. But it certainly had issues on 32 bit.
I will look at SHA1-ng if I have time. I really hate working on the -ng stuff.
@magnumripper commented on GitHub (Mar 18, 2015):
I'd be surprised if you see the same bug I saw in raw-sha1-ng on that OpenBSD gear. I can break right before that strrchr() and verify the 'key' string ends with 0x80. Still, the strrchr(key, 0x80) returns NULL. That just doesn't make sense so I'm tempted to just ignore that crapyard machine and close this.
@magnumripper commented on GitHub (Mar 18, 2015):
BTW for a while I thought it was something to do with 0x80 being negative (if a signed char) and that parameter to strrchr being an int. But as written, that 0x80 never is a char. It is a constant of 0x80 given where an int is expected, should be no problem at all. Besides, it works on all other machines I know of.
@magnumripper commented on GitHub (Mar 19, 2015):
Dropped the bug label from this one. It simply can't be a bug in the format, I could see everything being fine and dandy in the debugger - except the return from strrchr. Not sure what that is about, but it's not us.