{"id":1666,"date":"2017-04-27T21:37:05","date_gmt":"2017-04-27T19:37:05","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=1666"},"modified":"2017-04-30T11:08:08","modified_gmt":"2017-04-30T09:08:08","slug":"imageworsener-two-left-shift","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2017\/04\/27\/imageworsener-two-left-shift\/","title":{"rendered":"imageworsener: two left shift"},"content":{"rendered":"<p><strong>Description<\/strong>:<br \/>\n<a href=\"https:\/\/github.com\/jsummers\/imageworsener\">imageworsener<\/a> is a utility for image scaling and processing.<\/p>\n<p>There are two left shift visible with UbSan enabled.<\/p>\n<pre><font size=\"2\"># imagew $FILE \/tmp\/out -outfmt bmp\r\nsrc\/imagew-util.c:415:68: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'\r\nsrc\/imagew-bmp.c:427:10: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'\r\n<\/font><\/pre>\n<p><strong>Affected version:<\/strong><br \/>\n1.3.0<\/p>\n<p><strong>Fixed version:<\/strong><br \/>\n1.3.1<\/p>\n<p><strong>Commit fix:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/jsummers\/imageworsener\/commit\/a00183107d4b84bc8a714290e824ca9c68dac738\">https:\/\/github.com\/jsummers\/imageworsener\/commit\/a00183107d4b84bc8a714290e824ca9c68dac738<\/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-8326<\/p>\n<p><strong>Reproducer:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00271-imageworsener-leftshift\">https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00271-imageworsener-leftshift<\/a><\/p>\n<p><strong>Timeline:<\/strong><br \/>\n2017-04-13: bug discovered and reported to upstream<br \/>\n2017-04-22: upstream released a patch<br \/>\n2017-04-27: blog post about the issue<br \/>\n2017-04-29: 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=\"hOoJCNHFCA\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/blogs.gentoo.org\/ago\/2017\/04\/27\/imageworsener-two-left-shift\/\">imageworsener: two left shift<\/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\/04\/27\/imageworsener-two-left-shift\/embed\/#?secret=hOoJCNHFCA\" data-secret=\"hOoJCNHFCA\" width=\"600\" height=\"338\" title=\"&#8220;imageworsener: two left shift&#8221; &#8212; agostino&#039;s blog\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: imageworsener is a utility for image scaling and processing. There are two left shift visible with UbSan enabled. # imagew $FILE \/tmp\/out -outfmt bmp src\/imagew-util.c:415:68: runtime error: left shift of 255 by 24 places cannot be represented in type &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2017\/04\/27\/imageworsener-two-left-shift\/\">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-qS","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1666"}],"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=1666"}],"version-history":[{"count":4,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1666\/revisions"}],"predecessor-version":[{"id":1712,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1666\/revisions\/1712"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=1666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=1666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=1666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}