-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--encoding=[any but ASCII] --list=[format-tests, format-all-details, format-details] with ASan #1239
Comments
Given all the trouble ASan seems to have with OpenCL and CUDA, may be it is indeed better to first fuzz a 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. |
Thanks for your advice. |
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). |
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. |
OK. Get it. |
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 ()
The text was updated successfully, but these errors were encountered: