{"id":886,"date":"2016-11-09T16:34:23","date_gmt":"2016-11-09T14:34:23","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=886"},"modified":"2017-04-29T15:44:47","modified_gmt":"2017-04-29T13:44:47","slug":"libming-listmp3-left-shift-in-listmp3-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2016\/11\/09\/libming-listmp3-left-shift-in-listmp3-c\/","title":{"rendered":"libming: listmp3: left shift in listmp3.c"},"content":{"rendered":"<p><strong>Description<\/strong>:<br \/>\n<a href=\"http:\/\/www.libming.org\">libming<\/a> is a Flash (SWF) output library. It can be used from PHP, Perl, Ruby, Python, C, C++, Java, and probably more on the way..<\/p>\n<p>A fuzzing revealed a left shift in listmp3. The bug does not reside in any shared object but if you have a web application that calls directly the listmp3 binary to parse untrusted mp3, then you are affected.<\/p>\n<p>The complete UBSan output:<\/p>\n<pre><font size=\"2\"># listmp3 $FILE\r\nlistmp3.c:94:23: runtime error: left shift of negative value -1\r\nlistmp3.c:95:23: runtime error: left shift of negative value -1\r\n<\/font><\/pre>\n<p><strong>Affected version:<\/strong><br \/>\n0.4.7<\/p>\n<p><strong>Fixed version:<\/strong><br \/>\n0.4.8<\/p>\n<p><strong>Commit fix:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/libming\/libming\/commit\/2e5a98a0dbbd9714294007c601e584aa201494ed\">https:\/\/github.com\/libming\/libming\/commit\/2e5a98a0dbbd9714294007c601e584aa201494ed<\/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-9266<\/p>\n<p><strong>Reproducer:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00046-libming-leftshift-listmp3_c\">https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00046-libming-leftshift-listmp3_c<\/a><\/p>\n<p><strong>Timeline:<\/strong><br \/>\n2016-08-13: bug discovered<br \/>\n2016-10-20: bug reported to upstream<br \/>\n2016-11-09: blog post about the issue<br \/>\n2016-11-10: CVE assigned<br \/>\n2017-01-30: upstream released a patch<br \/>\n2017-04-07: upstream released 0.4.8<\/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=\"kNWoF0JCAG\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/blogs.gentoo.org\/ago\/2016\/11\/09\/libming-listmp3-left-shift-in-listmp3-c\/\">libming: listmp3: left shift in listmp3.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\/09\/libming-listmp3-left-shift-in-listmp3-c\/embed\/#?secret=kNWoF0JCAG\" data-secret=\"kNWoF0JCAG\" width=\"600\" height=\"338\" title=\"&#8220;libming: listmp3: left shift in listmp3.c&#8221; &#8212; agostino&#039;s blog\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: libming is a Flash (SWF) output library. It can be used from PHP, Perl, Ruby, Python, C, C++, Java, and probably more on the way.. A fuzzing revealed a left shift in listmp3. The bug does not reside in &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2016\/11\/09\/libming-listmp3-left-shift-in-listmp3-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-ei","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/886"}],"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=886"}],"version-history":[{"count":5,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/886\/revisions"}],"predecessor-version":[{"id":1692,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/886\/revisions\/1692"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}