{"id":939,"date":"2016-11-19T18:14:27","date_gmt":"2016-11-19T16:14:27","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=939"},"modified":"2016-11-23T10:46:07","modified_gmt":"2016-11-23T08:46:07","slug":"imagemagick-null-pointer-must-never-be-null-tiff-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2016\/11\/19\/imagemagick-null-pointer-must-never-be-null-tiff-c\/","title":{"rendered":"imagemagick: null pointer must never be null (tiff.c)"},"content":{"rendered":"<p><strong>Description<\/strong>:<br \/>\n<a href=\"http:\/\/www.imagemagick.org\/script\/index.php\">imagemagick<\/a> is a software suite to create, edit, compose, or convert bitmap images.<\/p>\n<p>A fuzz on an updated version with the undefined behavior sanitizer enabled, revealed a null pointer which is declared to never be null.<\/p>\n<p>The complete UBSan output:<\/p>\n<pre><font size=\"2\"># identify $FILE\r\ncoders\/tiff.c:655:39: runtime error: null pointer passed as argument 2, which is declared to never be null\r\nMagickCore\/string_.h:76:23: note: nonnull attribute specified here\r\n<\/font><\/pre>\n<p><strong>Affected version:<\/strong><br \/>\n7.0.3.6<\/p>\n<p><strong>Fixed version:<\/strong><br \/>\n7.0.3.7<\/p>\n<p><strong>Commit fix:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/ImageMagick\/ImageMagick\/commit\/b61d35eaccc0a7ddeff8a1c3abfcd0a43ccf210b\">https:\/\/github.com\/ImageMagick\/ImageMagick\/commit\/b61d35eaccc0a7ddeff8a1c3abfcd0a43ccf210b<\/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-2016-9559<\/p>\n<p><strong>Reproducer:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00049-imagemagick-pointernerverbenull\">https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00049-imagemagick-pointernerverbenull<\/a><\/p>\n<p><strong>Timeline:<\/strong><br \/>\n2016-11-09: bug discovered and reported to upstream<br \/>\n2016-11-09: upstream released a patch<br \/>\n2016-11-15: upstream released 7.0.3.7<br \/>\n2016-11-19: blog post about the issue<br \/>\n2016-11-23: 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=\"fi79bvs0bZ\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/blogs.gentoo.org\/ago\/2016\/11\/19\/imagemagick-null-pointer-must-never-be-null-tiff-c\/\">imagemagick: null pointer must never be null (tiff.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\/11\/19\/imagemagick-null-pointer-must-never-be-null-tiff-c\/embed\/#?secret=fi79bvs0bZ\" data-secret=\"fi79bvs0bZ\" width=\"600\" height=\"338\" title=\"&#8220;imagemagick: null pointer must never be null (tiff.c)&#8221; &#8212; agostino&#039;s blog\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: imagemagick is a software suite to create, edit, compose, or convert bitmap images. A fuzz on an updated version with the undefined behavior sanitizer enabled, revealed a null pointer which is declared to never be null. The complete UBSan &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2016\/11\/19\/imagemagick-null-pointer-must-never-be-null-tiff-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-f9","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/939"}],"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=939"}],"version-history":[{"count":5,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/939\/revisions"}],"predecessor-version":[{"id":960,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/939\/revisions\/960"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}