{"id":1875,"date":"2017-06-28T14:16:08","date_gmt":"2017-06-28T12:16:08","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=1875"},"modified":"2017-07-10T11:09:24","modified_gmt":"2017-07-10T09:09:24","slug":"xar-null-pointer-dereference-in-xar_unserialize-archive-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2017\/06\/28\/xar-null-pointer-dereference-in-xar_unserialize-archive-c\/","title":{"rendered":"xar: NULL pointer dereference in xar_unserialize (archive.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==7615==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f71a859ebd6 bp 0x7fffd8ace150 sp 0x7fffd8acde80 T0)\r\n==7615==The signal is caused by a WRITE memory access.\r\n==7615==Hint: address points to the zero page.\r\n    #0 0x7f71a859ebd5 in xar_unserialize \/var\/tmp\/portage\/app-arch\/xar-1.6.1-r1\/work\/xar-1.6.1\/lib\/archive.c:1767:27\r\n    #1 0x7f71a859ebd5 in xar_open \/var\/tmp\/portage\/app-arch\/xar-1.6.1-r1\/work\/xar-1.6.1\/lib\/archive.c:340\r\n    #2 0x5139ee in list \/var\/tmp\/portage\/app-arch\/xar-1.6.1-r1\/work\/xar-1.6.1\/src\/xar.c:1492:6\r\n    #3 0x5139ee in main \/var\/tmp\/portage\/app-arch\/xar-1.6.1-r1\/work\/xar-1.6.1\/src\/xar.c:2666\r\n    #4 0x7f71a76a2680 in __libc_start_main \/tmp\/portage\/sys-libs\/glibc-2.23-r3\/work\/glibc-2.23\/csu\/..\/csu\/libc-start.c:289\r\n    #5 0x41af38 in _init (\/usr\/bin\/xar+0x41af38)\r\n\r\nAddressSanitizer can not provide additional info.\r\nSUMMARY: AddressSanitizer: SEGV \/var\/tmp\/portage\/app-arch\/xar-1.6.1-r1\/work\/xar-1.6.1\/lib\/archive.c:1767:27 in xar_unserialize\r\n==7615==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-11124<\/p>\n<p><strong>Reproducer:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00288-xar-nullptr-xar_unserialize\">https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00288-xar-nullptr-xar_unserialize<\/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=\"ICmmff2Yfj\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/blogs.gentoo.org\/ago\/2017\/06\/28\/xar-null-pointer-dereference-in-xar_unserialize-archive-c\/\">xar: NULL pointer dereference in xar_unserialize (archive.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=\"http:\/\/blogs.gentoo.org\/ago\/2017\/06\/28\/xar-null-pointer-dereference-in-xar_unserialize-archive-c\/embed\/#?secret=ICmmff2Yfj\" data-secret=\"ICmmff2Yfj\" width=\"600\" height=\"338\" title=\"&#8220;xar: NULL pointer dereference in xar_unserialize (archive.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 ==7615==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f71a859ebd6 bp 0x7fffd8ace150 sp 0x7fffd8acde80 T0) ==7615==The signal is caused by a &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2017\/06\/28\/xar-null-pointer-dereference-in-xar_unserialize-archive-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-uf","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1875"}],"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=1875"}],"version-history":[{"count":4,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1875\/revisions"}],"predecessor-version":[{"id":1931,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1875\/revisions\/1931"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=1875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=1875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=1875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}