mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1239] --encoding=[any but ASCII] --list=[format-tests, format-all-details, format-details] with ASan #778
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#778
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 @loverszhaokai on GitHub (Apr 28, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1239
Originally assigned to: @loverszhaokai on GitHub.
The GDB info likes #1231, maybe they are the same problem.
#1. Prepare
$ export ASAN_OPTIONS='abort_on_error=1'
$ CC=clang AFL_USE_ASAN=1 AFL_HARDEN=1 ./configure --enable-asan --enable-memdbg && make -sj8
#2. Reproduce
$ ./john --encoding=[any but ASCII] --list=[format-tests, format-all-details, format-details]
...
...
Segmentation fault
#3. Gdb
$ gdb ./john
$ set args --encoding=UTF-8 --list=format-details
$ r
...
...
Program received signal SIGSEGV, Segmentation fault.
__interceptor_free (ptr=0x6060000e9720) at /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:29
29 INTERCEPTOR(void, free, void *ptr) {
(gdb) bt
#0 __interceptor_free (ptr=0x6060000e9720) at /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:29
#1 0x00007fffea824637 in ?? () from /usr/lib64/libnvidia-opencl.so.1
#2 0x00007fffea846070 in ?? () from /usr/lib64/libnvidia-opencl.so.1
#3 0x00007fffea8194e2 in ?? () from /usr/lib64/libnvidia-opencl.so.1
#4 0x00007fffea8c4388 in ?? () from /usr/lib64/libnvidia-opencl.so.1
#5 0x00007fffea8c4026 in ?? () from /usr/lib64/libnvidia-opencl.so.1
#6 0x00007ffff70e6172 in khrIcdVendorAdd () from /usr/lib64/libOpenCL.so.1
#7 0x00007ffff70e8106 in khrIcdOsVendorsEnumerate () from /usr/lib64/libOpenCL.so.1
#8 0x00007ffff70e77e0 in clGetPlatformIDs () from /usr/lib64/libOpenCL.so.1
#9 0x00000000009673ce in start_opencl_environment ()
#10 0x000000000095a14b in opencl_preinit ()
#11 0x00000000009620c1 in opencl_prepare_dev ()
#12 0x0000000000962ceb in opencl_init ()
#13 0x00000000007aacf8 in init ()
#14 0x00000000008bb058 in fmt_init ()
#15 0x0000000000926386 in listconf_parse_late ()
#16 0x00000000008c7fed in john_init ()
#17 0x00000000008c6a58 in main ()
@frank-dittrich commented on GitHub (Apr 28, 2015):
Given all the trouble ASan seems to have with OpenCL and CUDA, may be it is indeed better to first fuzz a
--disable-opencl --disable-cudabuild.A second step could then be to test a build with OpenCL and CUDA and with memdbg, but without ASan, and check the memdbg output for errors.
Since only GPU related problems should remain for this second step, you might limit fuzzing to GPU specific options (
--device,--list=cuda-devices,--list=opencl-devices) or options that behave differently when OpenCL or CUDA are supported (--list=build-info, which shows OpenCL specific or CUDA specific information)For everything related to formats (
--test,--list?formats, --list=format-*`), you might alway add --format=gpu, to avoid repeating tests of CPU formats.@loverszhaokai commented on GitHub (Apr 28, 2015):
@frank-dittrich
Thanks for your advice.
@frank-dittrich commented on GitHub (Apr 28, 2015):
Probably asan cannot rewrite malloc() etc. for libraries which get loaded prior to libasan.
gcc 4.9 and newer do have
This can be be a workaround.
Another could be using LD_PRELOAD, see https://code.google.com/p/address-sanitizer/wiki/AsanAsDso
But I really suggest you fuzz non-gpu builds first (should also be much faster).
@magnumripper commented on GitHub (Apr 28, 2015):
Absolutely. Please do not add any more issues with Asan in combination of OpenCL or CUDA unless you can verify there is still a problem when ASan is not involved. I regard this an invalid issue.
@loverszhaokai commented on GitHub (Apr 29, 2015):
OK. Get it.