{"id":2173,"date":"2017-09-08T17:04:11","date_gmt":"2017-09-08T15:04:11","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=2173"},"modified":"2017-09-13T23:01:20","modified_gmt":"2017-09-13T21:01:20","slug":"mp3gain-invalid-memory-write-in-copy_mp-mpglibdblinterface-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2017\/09\/08\/mp3gain-invalid-memory-write-in-copy_mp-mpglibdblinterface-c\/","title":{"rendered":"mp3gain: invalid memory write in copy_mp (mpglibDBL\/interface.c)"},"content":{"rendered":"<p><strong>Description<\/strong>:<br \/>\n<a href=\"http:\/\/mp3gain.sourceforge.net\/\">mp3gain<\/a> is a program to analyze and adjust MP3 files to same volume.<\/p>\n<p>The fuzz was done via the aacgain command-line tool which uses mp3gain which bundles an old-modified version of mpg123 called mpglibDBL.<br \/>\nThe upstream project seems to be dead, so the issue wasn\u2019t communicated to them.<\/p>\n<p>The complete ASan output of the issue:<\/p>\n<pre><font size=\"2\"># aacgain -f $FILE\r\nASAN:DEADLYSIGNAL\r\n=================================================================\r\n==15053==ERROR: AddressSanitizer: SEGV on unknown address 0x104db559357d (pc 0x7f06b1457af7 bp 0x7ffed0c702a0 sp 0x7ffed0c6fa30 T0)\r\n    #0 0x7f06b1457af6  (\/usr\/lib\/gcc\/x86_64-pc-linux-gnu\/6.4.0\/libasan.so.3+0x5caf6)\r\n    #1 0x8a8ad0 in copy_mp \/var\/tmp\/portage\/media-sound\/aacgain-1.9\/work\/aacgain-1.9\/mp3gain\/mpglibDBL\/interface.c:188\r\n    #2 0x8ad77e in decodeMP3 \/var\/tmp\/portage\/media-sound\/aacgain-1.9\/work\/aacgain-1.9\/mp3gain\/mpglibDBL\/interface.c:538\r\n    #3 0x43e767 in main \/var\/tmp\/portage\/media-sound\/aacgain-1.9\/work\/aacgain-1.9\/mp3gain\/mp3gain.c:2262\r\n    #4 0x7f06b0770680 in __libc_start_main (\/lib64\/libc.so.6+0x20680)\r\n    #5 0x4426c8 in _start (\/usr\/bin\/aacgain+0x4426c8)\r\n\r\nAddressSanitizer can not provide additional info.\r\nSUMMARY: AddressSanitizer: SEGV (\/usr\/lib\/gcc\/x86_64-pc-linux-gnu\/6.4.0\/libasan.so.3+0x5caf6) \r\n==15053==ABORTING\r\n<\/font><\/pre>\n<p><strong>Affected version:<\/strong><br \/>\n1.5.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-14412<\/p>\n<p><strong>Reproducer:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00352-aacgain-invalidwrite-copy_mp\">https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00352-aacgain-invalidwrite-copy_mp<\/a><\/p>\n<p><strong>Timeline:<\/strong><br \/>\n2017-08-28: bug discovered<br \/>\n2017-09-08: blog post about the issue<br \/>\n2017-09-13: 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>.<br \/>\nThis bug was identified with bare metal servers donated by <a href=\"https:\/\/www.packet.net\/\">Packet<\/a>. This work is also supported by the <a href=\"https:\/\/www.coreinfrastructure.org\">Core Infrastructure Initiative<\/a>.<\/p>\n<p><strong>Permalink:<\/strong><\/p>\n<blockquote data-secret=\"P2fDwrXzQy\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/blogs.gentoo.org\/ago\/2017\/09\/08\/mp3gain-invalid-memory-write-in-copy_mp-mpglibdblinterface-c\/\">mp3gain: invalid memory write in copy_mp (mpglibDBL\/interface.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\/09\/08\/mp3gain-invalid-memory-write-in-copy_mp-mpglibdblinterface-c\/embed\/#?secret=P2fDwrXzQy\" data-secret=\"P2fDwrXzQy\" width=\"600\" height=\"338\" title=\"&#8220;mp3gain: invalid memory write in copy_mp (mpglibDBL\/interface.c)&#8221; &#8212; agostino&#039;s blog\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: mp3gain is a program to analyze and adjust MP3 files to same volume. The fuzz was done via the aacgain command-line tool which uses mp3gain which bundles an old-modified version of mpg123 called mpglibDBL. The upstream project seems to &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2017\/09\/08\/mp3gain-invalid-memory-write-in-copy_mp-mpglibdblinterface-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-z3","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/2173"}],"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=2173"}],"version-history":[{"count":5,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/2173\/revisions"}],"predecessor-version":[{"id":2258,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/2173\/revisions\/2258"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=2173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=2173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=2173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}