mirror of
https://github.com/openwall/john.git
synced 2026-12-03 20:43:49 +07:00
[GH-ISSUE #1200] memdbg does not honor alignment requests beyond sizeof(integer SIMD vector). #750
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#750
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 (Apr 12, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1200
Originally assigned to: @jfoug on GitHub.
When memdbg is used, if you ask for an alignment larger than 16 using
mem_alloc_align(), you are actually 100% guaranteed to only get an aligment of 16. This in turns guarantees a segfault with eg. AVX2 or wider SIMD.@magnumripper commented on GitHub (Apr 26, 2015):
I think I have an idea how this should be solved. We need to add a union with vtype (which is typedef'ed in pseudo-intrinsics.h) to MEMDBG_HDR. Or simply pad with
sizeof(vtype) - 16bytes.@magnumripper commented on GitHub (Apr 27, 2015):
8506e3c(and717964fb51,e4a995ae) only made it slightly better, and usable with AVX2 and AVX512. Now, memdbg can't give you better alignment than sizeof(integer SIMD vector). If you ask for more (eg. MEM_ALIGN_CACHE) you will still only get MEM_ALIGN_SIMD. In most cases, this is sufficient but it's technically a bug in memdbg.@jfoug commented on GitHub (May 27, 2015):
This should be fixed (I think) in
20ce8feThere is a #define in john.c (at the very start of main) that should test memdbg. It simple tests all alignments from 1 to 256. It checks that the alignment is correct
@jfoug commented on GitHub (May 28, 2015):
Can someone please test this with some data that requires > 16 byte alignment? I have tested with the test code in john.c, so I am pretty sure it is working properly. However, I am not going to close this one without hearing that 'real' code is working properly.
@magnumripper commented on GitHub (May 28, 2015):
An AVX2 build (with MEM_ALIGN_SIMD as 32) on well works like a champ. I also verified that MEM_ALIGN_CACHE and MEM_ALIGN_PAGE does what they should 👍