{"action":"created","issue":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1239","labels_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1239/labels{/name}","comments_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1239/comments","events_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1239/events","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/1239","id":71582053,"number":1239,"title":"--encoding=[any but ASCII] --list=[format-tests, format-all-details, format-details] with ASan","user":{"login":"loverszhaokai","id":2187242,"avatar_url":"https://avatars.githubusercontent.com/u/2187242?v=3","gravatar_id":"","url":"https://api.github.com/users/loverszhaokai","html_url":"https://github.com/loverszhaokai","followers_url":"https://api.github.com/users/loverszhaokai/followers","following_url":"https://api.github.com/users/loverszhaokai/following{/other_user}","gists_url":"https://api.github.com/users/loverszhaokai/gists{/gist_id}","starred_url":"https://api.github.com/users/loverszhaokai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loverszhaokai/subscriptions","organizations_url":"https://api.github.com/users/loverszhaokai/orgs","repos_url":"https://api.github.com/users/loverszhaokai/repos","events_url":"https://api.github.com/users/loverszhaokai/events{/privacy}","received_events_url":"https://api.github.com/users/loverszhaokai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-28T12:55:32Z","updated_at":"2015-04-28T14:26:28Z","closed_at":null,"body":"The GDB info likes #1231, maybe they are the same problem.\r\n\r\n# 1. Prepare\r\n$ export ASAN_OPTIONS='abort_on_error=1'\r\n$ CC=clang AFL_USE_ASAN=1 AFL_HARDEN=1 ./configure --enable-asan --enable-memdbg && make -sj8\r\n\r\n# 2. Reproduce\r\n$ ./john --encoding=[any but ASCII] --list=[format-tests, format-all-details, format-details]\r\n...\r\n...\r\nSegmentation fault\r\n\r\n# 3. Gdb\r\n$ gdb ./john\r\n$ set args --encoding=UTF-8 --list=format-details\r\n$ r\r\n...\r\n...\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n__interceptor_free (ptr=0x6060000e9720) at /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:29\r\n29\tINTERCEPTOR(void, free, void *ptr) {\r\n(gdb) bt\r\n#0  __interceptor_free (ptr=0x6060000e9720) at /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:29\r\n#1  0x00007fffea824637 in ?? () from /usr/lib64/libnvidia-opencl.so.1\r\n#2  0x00007fffea846070 in ?? () from /usr/lib64/libnvidia-opencl.so.1\r\n#3  0x00007fffea8194e2 in ?? () from /usr/lib64/libnvidia-opencl.so.1\r\n#4  0x00007fffea8c4388 in ?? () from /usr/lib64/libnvidia-opencl.so.1\r\n#5  0x00007fffea8c4026 in ?? () from /usr/lib64/libnvidia-opencl.so.1\r\n#6  0x00007ffff70e6172 in khrIcdVendorAdd () from /usr/lib64/libOpenCL.so.1\r\n#7  0x00007ffff70e8106 in khrIcdOsVendorsEnumerate () from /usr/lib64/libOpenCL.so.1\r\n#8  0x00007ffff70e77e0 in clGetPlatformIDs () from /usr/lib64/libOpenCL.so.1\r\n#9  0x00000000009673ce in start_opencl_environment ()\r\n#10 0x000000000095a14b in opencl_preinit ()\r\n#11 0x00000000009620c1 in opencl_prepare_dev ()\r\n#12 0x0000000000962ceb in opencl_init ()\r\n#13 0x00000000007aacf8 in init ()\r\n#14 0x00000000008bb058 in fmt_init ()\r\n#15 0x0000000000926386 in listconf_parse_late ()\r\n#16 0x00000000008c7fed in john_init ()\r\n#17 0x00000000008c6a58 in main ()"},"comment":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/comments/97083010","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/1239#issuecomment-97083010","issue_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1239","id":97083010,"user":{"login":"frank-dittrich","id":2026819,"avatar_url":"https://avatars.githubusercontent.com/u/2026819?v=3","gravatar_id":"","url":"https://api.github.com/users/frank-dittrich","html_url":"https://github.com/frank-dittrich","followers_url":"https://api.github.com/users/frank-dittrich/followers","following_url":"https://api.github.com/users/frank-dittrich/following{/other_user}","gists_url":"https://api.github.com/users/frank-dittrich/gists{/gist_id}","starred_url":"https://api.github.com/users/frank-dittrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frank-dittrich/subscriptions","organizations_url":"https://api.github.com/users/frank-dittrich/orgs","repos_url":"https://api.github.com/users/frank-dittrich/repos","events_url":"https://api.github.com/users/frank-dittrich/events{/privacy}","received_events_url":"https://api.github.com/users/frank-dittrich/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T14:26:28Z","updated_at":"2015-04-28T14:26:28Z","body":"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-cuda` build.\r\n\r\nA 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.\r\nSince 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)\r\nFor everything related to formats (`--test`, `--list?formats`, --list=format-*`), you might alway add --format=gpu, to avoid repeating tests of CPU formats."}}