mirror of
https://github.com/openwall/john.git
synced 2026-12-03 20:43:49 +07:00
[GH-ISSUE #757] Add binary clean test (similar to salt-clean) #392
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#392
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 @jfoug on GitHub (Sep 24, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/757
Originally assigned to: @jfoug on GitHub.
same as #753 but for binary data. Needed if there are more than one length data in binary, that varies with the salt (like 1 salt saying to use md5, then next saying to use sha1)
@magnumripper commented on GitHub (Sep 24, 2014):
A quick check (using an identical code block as #753 but
s/salt/binary/g)@magnumripper commented on GitHub (Sep 24, 2014):
Dummy format is a red herring. The binary hash functions are safe.
Perhaps we could do a more elaborate test, like verifying that binary_hash() return the same value after we polluted the buffer and re-called binary(). That would take dummy away. Not sure if it would take some real problems away too.
I'm leaning towards all of them are non-issues. We should probably not commit this.
@magnumripper commented on GitHub (Sep 24, 2014):
Or maybe they really are issues regardless of binary_hash():
@magnumripper commented on GitHub (Sep 24, 2014):
No I am committing this. Snefru and Skein were real bugs for sure. And the correct fix was not a memset().
@magnumripper commented on GitHub (Sep 24, 2014):
IKE fixed, although it's a bodge (it was already a bodge but now it's safer).
Formspring I'll leave to you, it's a dynamic and I couldn't spot the problem quickly.
@magnumripper commented on GitHub (Sep 24, 2014):
All fixed except Formspring. GPU formats checked too.
@jfoug commented on GitHub (Sep 25, 2014):
FIxed formspring, BUT I need to double check all thin formats.
For dyna, all binary_size should be 16 bytes.
for dyna, all binary align should be word
for dyna all salt_size should be sizeof (char*)
for dyna all salt align should be word
That is as long as binary and salt are being used from dyna (I think most thin would do that). For the hybrid ones, I would need to not return dyna's binary, or salt, but memcpy the return of binary/salt into the buffer to be returned. I think I did that in net-sha1/md5
But formspring is fixed, I will dig into all other thin dyna's.
@jfoug commented on GitHub (Sep 25, 2014):
Good issue, it certainly WAS wrong in formspring. I bet there are other thins that are also wrong. Likely they would blow chunks on non-align machines, in the least.
@jfoug commented on GitHub (Sep 25, 2014):
Fix for formspring:
0945f63This fixes all other dyna thin formats.
4454406@jfoug commented on GitHub (Sep 25, 2014):
NOTE, the salt-smashing on dyna's prior to setting them to sizeof(char*), the new self-test salt smashing code was smashing 'something' in the dseg (well, where ever static's live). I am NOT sure why the salt check was not catching this??
The static buffer is this:
Also, all binary's in dyna are 16 bytes long. That is just the way it is.
@magnumripper commented on GitHub (Sep 25, 2014):
Maybe Dynamic could have it's own self-tests in dynamic_THIN_FORMAT_LINK(), that just verifies the above, eg. something like:
Would this work at all?
@jfoug commented on GitHub (Sep 25, 2014):
I do not think that would work. How would I be able to do a format like net-sha1, where the semi-thick format's format structure is 20 bytes, but it allows to optionally use dyna. So when I link, that one would always warn, even though I am now handling it properly.
I might look at adding some self test stuff to THIN_LINK, but i have to be really careful.