mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1067] ASan error in base64_convert with --format=hmac-md5 #661
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#661
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 @frank-dittrich on GitHub (Mar 3, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1067
64bit Linux
Built with
--enable-asan --enable-memdbg-ex(and with --enable-rexgen, but I doubt that this matters).@magnumripper commented on GitHub (Mar 3, 2015):
That's a bug and the correct fix is this
However @jfoug the above fails self-test. To make it work I need to give
strlen(d) + 1as input length which is obviously not correct! Is this a bug in base64_convert() or do I misunderstand something?@magnumripper commented on GitHub (Mar 3, 2015):
I committed the fix with +1 in
914cc05. But it looks very strange to me so I'm not closing yet.@frank-dittrich commented on GitHub (Mar 3, 2015):
Apparently, this commit also causes TS to fail for dynaimic_31 and dynamic_2001.
@jfoug commented on GitHub (Mar 3, 2015):
This is an easy fix. The later memmove is not copying the null byte (you only copy 0x20 bytes, not 0x21), so the length of the hash is too long. Copy the null and the problem goes away. I will commit and @frank-dittrich can check if there are failures, BUT there should be no interaction, I think.
@magnumripper commented on GitHub (Mar 3, 2015):
I still think the notion of
strlen(d) + 1as "length of input to use" has got to be flawed. I have a buffer (of any length, but in this case 53 bytes) with 52 characters that I want to convert. Why do I have to ask for 53?@magnumripper commented on GitHub (Mar 3, 2015):
Oh, now I get it (after reviewing
9ff7aa0). LOL I'm stupid.@jfoug commented on GitHub (Mar 3, 2015):
The problem was len was a 'longer' value (I think) so the null byte was copied before. Now we return proper length.
Now, there MAY be a problem in base-64 convert, where the length returned is wrong, if the code hits a null byte less than length of string. I will investigate this.
However, after your fix, and
9ff7aa0, I think 'this' bug is squashed.@jfoug commented on GitHub (Mar 3, 2015):
Ok, I added a quick-dirty function, and yes, there are problems:
I pass same data (actually code from the XSHA512 code.I then do strlen(p) and then other calls with strlen(p)+xx You can see the length returned is not right.
@jfoug commented on GitHub (Mar 3, 2015):
I have done some fixing in base64_conv code.Now the len=37 is returned for all of the above conversions, and added that quick/dirty function to the base64conv program if a -l switch (length) is used.