{"action":"created","issue":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1548","labels_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1548/labels{/name}","comments_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1548/comments","events_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1548/events","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/1548","id":94550380,"number":1548,"title":"opencl_mscash_fmt_plug.c:364  SegFault","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":[{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/labels/bug","name":"bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-12T09:29:26Z","updated_at":"2015-07-12T13:46:15Z","closed_at":"2015-07-12T13:46:15Z","body":"# 1. Reproduce\r\n\r\n$ cat pwfile\r\n```\r\nM$test29ab60bdb4493822b175486810ac2abe63\r\n```\r\n$ CC=clang ./configure --enable-opencl && make -sj8\r\n$ ./john pwfile\r\n```\r\nSegmentation fault: 11\r\n```\r\n\r\n# 2. lldb Debug\r\n\r\n$ lldb -- ../john err_pwfiles/pwfile.mscash-opencl\r\n```C\r\n(lldb) target create \"../john\"\r\nCurrent executable set to '../john' (x86_64).\r\n(lldb) settings set -- target.run-args  \"err_pwfiles/pwfile.mscash-opencl\"\r\n(lldb) r\r\nProcess 60329 launched: '../john' (x86_64)\r\nProcess 60329 stopped\r\n* thread #1: tid = 0x56cfa, 0x000000010014d6d0 john`prepare [inlined] valid(ciphertext=0x00007fff5fbcf690) + 11 at opencl_mscash_fmt_plug.c:364, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1)\r\n    frame #0: 0x000000010014d6d0 john`prepare [inlined] valid(ciphertext=0x00007fff5fbcf690) + 11 at opencl_mscash_fmt_plug.c:364\r\n   361 \t\t\treturn 0;\r\n   362 \t\thash = p = strrchr(ciphertext, '#') + 1;\r\n   363 \t\twhile (*p)\r\n-> 364 \t\t\tif (atoi16[ARCH_INDEX(*p++)] == 0x7f)\r\n   365 \t\t\t\treturn 0;\r\n   366 \t\treturn p - hash == 32;\r\n   367 \t}\r\n(lldb) bt\r\n* thread #1: tid = 0x56cfa, 0x000000010014d6d0 john`prepare [inlined] valid(ciphertext=0x00007fff5fbcf690) + 11 at opencl_mscash_fmt_plug.c:364, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1)\r\n  * frame #0: 0x000000010014d6d0 john`prepare [inlined] valid(ciphertext=0x00007fff5fbcf690) + 11 at opencl_mscash_fmt_plug.c:364\r\n    frame #1: 0x000000010014d6c5 john`prepare(split_fields=0x00007fff5fbcf470, self=0x00000001008c5d70) + 101 at opencl_mscash_fmt_plug.c:384\r\n    frame #2: 0x00000001001ea5d1 john`ldr_split_line(login=<unavailable>, ciphertext=0x00007fff5fbcf590, gecos=<unavailable>, home=<unavailable>, uid=<unavailable>, source=<unavailable>, format=<unavailable>, db_opts=<unavailable>, line=<unavailable>) + 4017 at loader.c:721\r\n    frame #3: 0x00000001001e8c65 john`ldr_load_pw_line(db=0x00000001007e57a8, line=<unavailable>) + 245 at loader.c:865\r\n    frame #4: 0x00000001001ea979 john`read_file(db=<unavailable>, name=<unavailable>, flags=<unavailable>, process_line=<unavailable>) + 521 at loader.c:135\r\n    frame #5: 0x00000001001e7034 john`john_load + 1300 at john.c:1024\r\n    frame #6: 0x00000001001e45cd john`john_init(name=0x00007fff5fbff9ab, argc=2, argv=0x00007fff5fbff850) + 669 at john.c:1308\r\n    frame #7: 0x00000001001e42a3 john`main(argc=2, argv=0x00007fff5fbff850) + 1235 at john.c:1754\r\n    frame #8: 0x00007fff89c0d5c9 libdyld.dylib`start + 1\r\n(lldb)\r\n```"},"comment":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/comments/120721615","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/1548#issuecomment-120721615","issue_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1548","id":120721615,"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},"created_at":"2015-07-12T13:46:15Z","updated_at":"2015-07-12T13:46:15Z","body":"Fixed by https://github.com/magnumripper/JohnTheRipper/commit/1efe5fb5112c3ba693ec0a1cfbc0cb80037a9daa"}}