{"id":2162,"date":"2017-09-08T16:33:22","date_gmt":"2017-09-08T14:33:22","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=2162"},"modified":"2017-09-13T22:52:33","modified_gmt":"2017-09-13T20:52:33","slug":"mp3gain-null-pointer-dereference-in-sync_buffer-mpglibdblinterface-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2017\/09\/08\/mp3gain-null-pointer-dereference-in-sync_buffer-mpglibdblinterface-c\/","title":{"rendered":"mp3gain: NULL pointer dereference in sync_buffer (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==23063==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x0000008aafe0 bp 0x7ffe06c66450 sp 0x7ffe06c663f0 T0)\r\n    #0 0x8aafdf in sync_buffer \/var\/tmp\/portage\/media-sound\/aacgain-1.9\/work\/aacgain-1.9\/mp3gain\/mpglibDBL\/interface.c:393\r\n    #1 0x8ae64c in decodeMP3 \/var\/tmp\/portage\/media-sound\/aacgain-1.9\/work\/aacgain-1.9\/mp3gain\/mpglibDBL\/interface.c:665\r\n    #2 0x43e767 in main \/var\/tmp\/portage\/media-sound\/aacgain-1.9\/work\/aacgain-1.9\/mp3gain\/mp3gain.c:2262\r\n    #3 0x7fa37f734680 in __libc_start_main (\/lib64\/libc.so.6+0x20680)\r\n    #4 0x4426c8 in _start (\/usr\/bin\/aacgain+0x4426c8)\r\n\r\nAddressSanitizer can not provide additional info.\r\nSUMMARY: AddressSanitizer: SEGV \/var\/tmp\/portage\/media-sound\/aacgain-1.9\/work\/aacgain-1.9\/mp3gain\/mpglibDBL\/interface.c:393 in sync_buffer\r\n==23063==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-14406<\/p>\n<p><strong>Reproducer:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00347-aacgain-NULLptr-sync_buffer\">https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00347-aacgain-NULLptr-sync_buffer<\/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=\"PVKmC5Jhnc\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/blogs.gentoo.org\/ago\/2017\/09\/08\/mp3gain-null-pointer-dereference-in-sync_buffer-mpglibdblinterface-c\/\">mp3gain: NULL pointer dereference in sync_buffer (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-null-pointer-dereference-in-sync_buffer-mpglibdblinterface-c\/embed\/#?secret=PVKmC5Jhnc\" data-secret=\"PVKmC5Jhnc\" width=\"600\" height=\"338\" title=\"&#8220;mp3gain: NULL pointer dereference in sync_buffer (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-null-pointer-dereference-in-sync_buffer-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-yS","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/2162"}],"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=2162"}],"version-history":[{"count":8,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/2162\/revisions"}],"predecessor-version":[{"id":2250,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/2162\/revisions\/2250"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=2162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=2162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=2162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}