{"id":1876,"date":"2017-06-28T14:16:37","date_gmt":"2017-06-28T12:16:37","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=1876"},"modified":"2017-07-10T11:10:04","modified_gmt":"2017-07-10T09:10:04","slug":"xar-null-pointer-dereference-in-xar_get_path-util-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2017\/06\/28\/xar-null-pointer-dereference-in-xar_get_path-util-c\/","title":{"rendered":"xar: NULL pointer dereference in xar_get_path (util.c)"},"content":{"rendered":"<p><strong>Description<\/strong>:<br \/>\n<a href=\"https:\/\/github.com\/mackyle\/xar\">xar<\/a> is an easily extensible archive format.<\/p>\n<p>The complete ASan output of the issue:<\/p>\n<pre><font size=\"2\"># xar -t -f $FILE\r\n==5525==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f075cfb35f6 bp 0x7fff705167b0 sp 0x7fff70515f38 T0)\r\n==5525==The signal is caused by a READ memory access.\r\n==5525==Hint: address points to the zero page.\r\n    #0 0x7f075cfb35f5 in strlen \/tmp\/portage\/sys-libs\/glibc-2.23-r3\/work\/glibc-2.23\/string\/..\/sysdeps\/x86_64\/strlen.S:76\r\n    #1 0x45f5ef in __strdup \/tmp\/portage\/sys-libs\/compiler-rt-sanitizers-4.0.0\/work\/compiler-rt-4.0.0.src\/lib\/asan\/asan_interceptors.cc:562\r\n    #2 0x7f075decebc8 in xar_get_path \/var\/tmp\/portage\/app-arch\/xar-1.6.1-r1\/work\/xar-1.6.1\/lib\/util.c:95:8\r\n    #3 0x523f93 in print_file \/var\/tmp\/portage\/app-arch\/xar-1.6.1-r1\/work\/xar-1.6.1\/src\/xar.c:214:16\r\n    #4 0x513f07 in list \/var\/tmp\/portage\/app-arch\/xar-1.6.1-r1\/work\/xar-1.6.1\/src\/xar.c:1524:4\r\n    #5 0x513f07 in main \/var\/tmp\/portage\/app-arch\/xar-1.6.1-r1\/work\/xar-1.6.1\/src\/xar.c:2666\r\n    #6 0x7f075cf55680 in __libc_start_main \/tmp\/portage\/sys-libs\/glibc-2.23-r3\/work\/glibc-2.23\/csu\/..\/csu\/libc-start.c:289\r\n    #7 0x41af38 in _init (\/usr\/bin\/xar+0x41af38)\r\n\r\nAddressSanitizer can not provide additional info.\r\nSUMMARY: AddressSanitizer: SEGV \/tmp\/portage\/sys-libs\/glibc-2.23-r3\/work\/glibc-2.23\/string\/..\/sysdeps\/x86_64\/strlen.S:76 in strlen\r\n==5525==ABORTING\r\n<\/font><\/pre>\n<p><strong>Affected version:<\/strong><br \/>\n1.6.1<\/p>\n<p><strong>Fixed version:<\/strong><br \/>\nN\/A<\/p>\n<p><strong>Commit fix:<\/strong><br \/>\nN\/A<\/p>\n<p><strong>Credit:<\/strong><br \/>\nThis bug was discovered by Agostino Sarubbo of Gentoo.<\/p>\n<p><strong>CVE:<\/strong><br \/>\nCVE-2017-11125<\/p>\n<p><strong>Reproducer:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00287-xar-nullptr-xar_get_path\">https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00287-xar-nullptr-xar_get_path<\/a><\/p>\n<p><strong>Timeline:<\/strong><br \/>\n2017-06-17: bug discovered and reported to upstream<br \/>\n2017-06-28: blog post about the issue<br \/>\n2017-07-10: CVE assigned<\/p>\n<p><strong>Note:<\/strong><br \/>\nThis bug was found with <a href=\"http:\/\/lcamtuf.coredump.cx\/afl\">American Fuzzy Lop<\/a>.<\/p>\n<p><strong>Permalink:<\/strong><\/p>\n<blockquote data-secret=\"V3MTcZBOUA\" class=\"wp-embedded-content\"><p><a href=\"https:\/\/blogs.gentoo.org\/ago\/2017\/06\/28\/xar-null-pointer-dereference-in-xar_get_path-util-c\/\">xar: NULL pointer dereference in xar_get_path (util.c)<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/blogs.gentoo.org\/ago\/2017\/06\/28\/xar-null-pointer-dereference-in-xar_get_path-util-c\/embed\/#?secret=V3MTcZBOUA\" data-secret=\"V3MTcZBOUA\" width=\"600\" height=\"338\" title=\"&#8220;xar: NULL pointer dereference in xar_get_path (util.c)&#8221; &#8212; agostino&#039;s blog\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: xar is an easily extensible archive format. The complete ASan output of the issue: # xar -t -f $FILE ==5525==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f075cfb35f6 bp 0x7fff705167b0 sp 0x7fff70515f38 T0) ==5525==The signal is caused by a &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2017\/06\/28\/xar-null-pointer-dereference-in-xar_get_path-util-c\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":140,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[12,10],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2EaBc-ug","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1876"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/users\/140"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/comments?post=1876"}],"version-history":[{"count":4,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1876\/revisions"}],"predecessor-version":[{"id":1935,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1876\/revisions\/1935"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=1876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=1876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=1876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}