mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1284] KeePass format, "Warning: salt() returned misaligned pointer" for 32bit Linux clang build #809
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#809
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 9, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1284
In keepass_fmt_plug.c,
SALT_ALIGNis defined assizeof(long long).But in
get_salt(), we just havestatic struct custom_salt cs;, i.e., SALT_ALIGN is not used.But I don't know whether just adding
#include "aligned.h"and changing the definition toJTR_ALIGN(SALT_ALIGN) static struct custom_salt cs;really is the right fix, because of the definiton of custom_salt:Wouldn't it make sense to switch
versionandoffset?@magnumripper commented on GitHub (May 9, 2015):
Yes, it would. And I guess after that you won't need to add any JTR_ALIGN.
@frank-dittrich commented on GitHub (May 9, 2015):
OK, I'll try that.
But we really need to fix issue https://github.com/magnumripper/JohnTheRipper/issues/1195, because in repeated builds/runs without significant changes, I very rarely get this error.
So, testing that fix might not be very reliable.
@frank-dittrich commented on GitHub (May 9, 2015):
Scratch that, issue #1195 is unrelated, because here it is a static buffer.
@frank-dittrich commented on GitHub (May 10, 2015):
Just want to mention that I saw
on a 32bit Fedora 21 (clang version 3.5.0) with commit
bfc611d1e0.@frank-dittrich commented on GitHub (May 10, 2015):
Unfortunately, applying the suggested fix (switching the sequence of
long long offsetandint version) applied after commitbfc611ddidn't help. I still get the same warning.In commit
2ff23cf5, JimF adjusted SALT_ALIGN tosizeof (long long)because he saw crashes on sparc.I would feel better if we could test any fix on sparc (real metal, not a VM).
@magnumripper commented on GitHub (May 18, 2015):
If
9600110did not fix it, I call compiler bug.Workaround:
@jfoug commented on GitHub (Jun 1, 2015):
The issue 'should' have been addressed by moving the long long to being the first value. In that type build, there is nothing ambiguous for the compiler. Start of structure is 8 byte value needing 8 byte align for whole structure. I agree with @magnumripper, if this still throws the warning, it is a compiler bug.
It can also be fixed with a static null pointer, that is allocated upon first run of salt.
@jfoug commented on GitHub (Jun 1, 2015):
Btw, this does NOT crash on a sparc system (32 bit compiler), so I do not see this as an issue there, with the salt align, and with the static struct.