mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1300] Parameters that expect integer values: #826
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#826
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 (May 11, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1300
Originally assigned to: @solardiz on GitHub.
Accidentally, I forgot a space between
--test=2and--format=sunmd5, and got what I didn't intend.I can reproduce on master, will post this to john-dev as well:
@frank-dittrich commented on GitHub (May 11, 2015):
As mentioned in http://openwall.com/lists/john-dev/2015/05/11/24. negative values shouldn't be allowed, either:
@jfoug commented on GitHub (Jun 1, 2015):
Frank, the problem here is that what is used to parse these, is sscanf is used to parse, along with printf styled tokenized params. There is little more than this for context on how to parse.
So for --test we have this format: "%u" and this is the actual input that does the parse:
return sscanf(param, format, buffer) != 1;
So, sscanf with "%u" for 2xx is 2, and returns 1, so the code is 'happy'
also sscanf with "%u" for -2 is MAX_UINT-2 and the return is 1. So again the code is happy
I am not sure of what validation we can perform at all, without a total re-write of this logic. There 'might' be a way to do this to some extent, using a buffer, and sprintf, then comparing to see if original buffer and new buffer are the same, but it may be problematic. I can give that a shot and see.
@magnumripper commented on GitHub (Jun 1, 2015):
This is core code, I suggest we just live with it as long as Solar doesn't change it. If he does, we might want to improve Jumbo-specific parsing too.
@jfoug commented on GitHub (Jun 1, 2015):
Here is a simple 'parse' improvement for signed and unsigned int's (which almost ALL % types are)
Since this is core code, I do agree with you, however.