{"id":1822,"date":"2017-05-24T15:23:19","date_gmt":"2017-05-24T13:23:19","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=1822"},"modified":"2017-06-07T14:38:38","modified_gmt":"2017-06-07T12:38:38","slug":"ytnef-null-pointer-dereference-in-mapiprint-ytnef-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2017\/05\/24\/ytnef-null-pointer-dereference-in-mapiprint-ytnef-c\/","title":{"rendered":"ytnef: NULL pointer dereference in MAPIPrint (ytnef.c)"},"content":{"rendered":"<p><strong>Description<\/strong>:<br \/>\n<a href=\"https:\/\/github.com\/Yeraze\/ytnef\">ytnef<\/a> is Yeraze&#8217;s TNEF Stream Reader &#8211; for winmail.dat files.<\/p>\n<p>The complete ASan output of the issue:<\/p>\n<pre><font size=\"2\"># ytnefprint $FILE\r\n==12467==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f59364c62b6 bp 0x7ffe1b8d4af0 sp 0x7ffe1b8d4278 T0)\r\n==12467==The signal is caused by a READ memory access.\r\n==12467==Hint: address points to the zero page.\r\n    #0 0x7f59364c62b5 in strlen \/tmp\/portage\/sys-libs\/glibc-2.23-r3\/work\/glibc-2.23\/string\/..\/sysdeps\/x86_64\/strlen.S:76\r\n    #1 0x43e99c in __interceptor_strlen.part.31 \/tmp\/portage\/sys-libs\/compiler-rt-sanitizers-4.0.0\/work\/compiler-rt-4.0.0.src\/lib\/asan\/..\/sanitizer_common\/sanitizer_common_interceptors.inc:282\r\n    #2 0x7f593734a162 in MAPIPrint \/tmp\/ytnef-1.9.2\/lib\/ytnef.c:1437:15\r\n    #3 0x508f50 in PrintTNEF \/tmp\/ytnef-1.9.2\/ytnefprint\/main.c:169:5\r\n    #4 0x50882e in main \/tmp\/ytnef-1.9.2\/ytnefprint\/main.c:84:5\r\n    #5 0x7f593646878f in __libc_start_main \/tmp\/portage\/sys-libs\/glibc-2.23-r3\/work\/glibc-2.23\/csu\/..\/csu\/libc-start.c:289\r\n    #6 0x419c38 in _start (\/usr\/bin\/ytnefprint+0x419c38)\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==12467==ABORTING\r\n<\/font><\/pre>\n<p><strong>Affected version:<\/strong><br \/>\n1.9.2<\/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-9470<\/p>\n<p><strong>Reproducer:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00241-ytnef-nullptr-MAPIPrint\">https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00241-ytnef-nullptr-MAPIPrint<\/a><\/p>\n<p><strong>Timeline:<\/strong><br \/>\n2017-03-27: bug discovered and reported to upstream<br \/>\n2017-05-24: blog post about the issue<br \/>\n2017-06-07: 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=\"szdydj4Fxu\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/blogs.gentoo.org\/ago\/2017\/05\/24\/ytnef-null-pointer-dereference-in-mapiprint-ytnef-c\/\">ytnef: NULL pointer dereference in MAPIPrint (ytnef.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\/05\/24\/ytnef-null-pointer-dereference-in-mapiprint-ytnef-c\/embed\/#?secret=szdydj4Fxu\" data-secret=\"szdydj4Fxu\" width=\"600\" height=\"338\" title=\"&#8220;ytnef: NULL pointer dereference in MAPIPrint (ytnef.c)&#8221; &#8212; agostino&#039;s blog\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: ytnef is Yeraze&#8217;s TNEF Stream Reader &#8211; for winmail.dat files. The complete ASan output of the issue: # ytnefprint $FILE ==12467==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f59364c62b6 bp 0x7ffe1b8d4af0 sp 0x7ffe1b8d4278 T0) ==12467==The signal is caused by &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2017\/05\/24\/ytnef-null-pointer-dereference-in-mapiprint-ytnef-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-to","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1822"}],"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=1822"}],"version-history":[{"count":7,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1822\/revisions"}],"predecessor-version":[{"id":1868,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1822\/revisions\/1868"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=1822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=1822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=1822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}