{"id":627,"date":"2016-09-25T18:46:04","date_gmt":"2016-09-25T16:46:04","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=627"},"modified":"2016-10-16T20:51:01","modified_gmt":"2016-10-16T18:51:01","slug":"mupdf-mujstest-strcpy-param-overlap-in-main-jstest_main-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2016\/09\/25\/mupdf-mujstest-strcpy-param-overlap-in-main-jstest_main-c\/","title":{"rendered":"mupdf: mujstest: strcpy-param-overlap in main (jstest_main.c)"},"content":{"rendered":"<p><strong>Description<\/strong>:<br \/>\nMujstest, which is part of <a href=\"http:\/\/mupdf.com\/\">mupdf<\/a> is a scriptable tester for mupdf + js.<\/p>\n<p>A fuzzing revealed a strcpy-param-overlap.<\/p>\n<p>The complete ASan output:<\/p>\n<pre><font size=\"2\"># mujstest $FILE\r\n==26843==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x0000013c5d40,0x0000013c62ed) and [0x0000013c6285, 0x0000013c6832) overlap\r\n    #0 0x473129 in __interceptor_strcpy \/var\/tmp\/portage\/sys-devel\/llvm-3.8.0-r3\/work\/llvm-3.8.0.src\/projects\/compiler-rt\/lib\/asan\/asan_interceptors.cc:545\r\n    #1 0x4f7910 in main \/var\/tmp\/portage\/app-text\/mupdf-1.9a\/work\/mupdf-1.9a\/platform\/x11\/jstest_main.c:353:6\r\n    #2 0x7f8af37a961f in __libc_start_main \/var\/tmp\/portage\/sys-libs\/glibc-2.22-r4\/work\/glibc-2.22\/csu\/libc-start.c:289\r\n    #3 0x41ade8 in _init (\/usr\/bin\/mujstest+0x41ade8)\r\n\r\n0x0000013c6140 is located 0 bytes to the right of global variable 'filename' defined in 'platform\/x11\/jstest_main.c:15:13' (0x13c5d40) of size 1024\r\n0x0000013c6285 is located 5 bytes inside of global variable 'getline_buffer' defined in 'platform\/x11\/jstest_main.c:24:13' (0x13c6280) of size 4096\r\nSUMMARY: AddressSanitizer: strcpy-param-overlap \/var\/tmp\/portage\/sys-devel\/llvm-3.8.0-r3\/work\/llvm-3.8.0.src\/projects\/compiler-rt\/lib\/asan\/asan_interceptors.cc:545 in __interceptor_strcpy\r\n==26843==ABORTING\r\n<\/font><\/pre>\n<p><strong>Affected version:<\/strong><br \/>\n1.9a<\/p>\n<p><strong>Fixed version:<\/strong><br \/>\n1.10 (not yet released)<\/p>\n<p><strong>Commit fix:<\/strong><br \/>\n<a href=\"http:\/\/git.ghostscript.com\/?p=mupdf.git;h=cfe8f35bca61056363368c343be36812abde0a06\">http:\/\/git.ghostscript.com\/?p=mupdf.git;h=cfe8f35bca61056363368c343be36812abde0a06<\/a><\/p>\n<p><strong>Credit:<\/strong><br \/>\nThis bug was discovered by Agostino Sarubbo of Gentoo.<\/p>\n<p><strong>CVE:<\/strong><br \/>\nN\/A<\/p>\n<p><strong>Timeline:<\/strong><br \/>\n2016-08-04: bug discovered<br \/>\n2016-08-05: bug reported to upstream<br \/>\n2016-09-22: upstream released a patch<br \/>\n2016-09-25: blog post about the issue<\/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=\"7oIFoybJGB\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/blogs.gentoo.org\/ago\/2016\/09\/25\/mupdf-mujstest-strcpy-param-overlap-in-main-jstest_main-c\/\">mupdf: mujstest: strcpy-param-overlap in main (jstest_main.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\/2016\/09\/25\/mupdf-mujstest-strcpy-param-overlap-in-main-jstest_main-c\/embed\/#?secret=7oIFoybJGB\" data-secret=\"7oIFoybJGB\" width=\"600\" height=\"338\" title=\"&#8220;mupdf: mujstest: strcpy-param-overlap in main (jstest_main.c)&#8221; &#8212; agostino&#039;s blog\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: Mujstest, which is part of mupdf is a scriptable tester for mupdf + js. A fuzzing revealed a strcpy-param-overlap. The complete ASan output: # mujstest $FILE ==26843==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x0000013c5d40,0x0000013c62ed) and [0x0000013c6285, 0x0000013c6832) overlap #0 0x473129 in &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2016\/09\/25\/mupdf-mujstest-strcpy-param-overlap-in-main-jstest_main-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-a7","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/627"}],"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=627"}],"version-history":[{"count":5,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/627\/revisions"}],"predecessor-version":[{"id":748,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/627\/revisions\/748"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}