{"id":1160,"date":"2017-01-29T18:44:35","date_gmt":"2017-01-29T16:44:35","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=1160"},"modified":"2017-02-01T11:02:32","modified_gmt":"2017-02-01T09:02:32","slug":"mp3splt-invalid-free-in-free_options-options_manager-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2017\/01\/29\/mp3splt-invalid-free-in-free_options-options_manager-c\/","title":{"rendered":"mp3splt: invalid free in free_options (options_manager.c)"},"content":{"rendered":"<p><strong>Description<\/strong>:<br \/>\n<a href=\"http:\/\/mp3splt.sourceforge.net\">mp3splt<\/a> is a command line utility to split mp3 and ogg files without decoding.<\/p>\n<p>A fuzz on it discovered an invalid free.<\/p>\n<p>The complete ASan output:<\/p>\n<pre><font size=\"2\"># mp3splt -P -f -t 0.1 -a $FILE\r\n==2631==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x000000d3ef65 in thread T0\r\n    #0 0x4d3770 in free \/tmp\/portage\/sys-devel\/llvm-3.9.0-r1\/work\/llvm-3.9.0.src\/projects\/compiler-rt\/lib\/asan\/asan_malloc_linux.cc:47\r\n    #1 0x50dbaa in free_options \/tmp\/portage\/media-sound\/mp3splt-2.6.2\/work\/mp3splt-2.6.2\/src\/options_manager.c:67:9\r\n    #2 0x515623 in free_main_struct \/tmp\/portage\/media-sound\/mp3splt-2.6.2\/work\/mp3splt-2.6.2\/src\/data_manager.c:74:7\r\n    #3 0x50ffa5 in process_confirmation_error \/tmp\/portage\/media-sound\/mp3splt-2.6.2\/work\/mp3splt-2.6.2\/src\/print_utils.c:266:7\r\n    #4 0x51df29 in main \/tmp\/portage\/media-sound\/mp3splt-2.6.2\/work\/mp3splt-2.6.2\/src\/mp3splt.c:873:9\r\n    #5 0x7f783aba361f in __libc_start_main \/var\/tmp\/portage\/sys-libs\/glibc-2.22-r4\/work\/glibc-2.22\/csu\/libc-start.c:289\r\n    #6 0x41ad08 in _init (\/usr\/bin\/mp3splt+0x41ad08)\r\n\r\nAddressSanitizer can not describe address in more detail (wild memory access suspected).\r\nSUMMARY: AddressSanitizer: bad-free \/tmp\/portage\/sys-devel\/llvm-3.9.0-r1\/work\/llvm-3.9.0.src\/projects\/compiler-rt\/lib\/asan\/asan_malloc_linux.cc:47 in free\r\n==2631==ABORTING\r\n<\/font><\/pre>\n<p><strong>Affected version:<\/strong><br \/>\n0.9.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-5666<\/p>\n<p><strong>Reproducer:<\/strong><br \/>\n<a href=\"https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00130-mp3splt-badfree-free_options\">https:\/\/github.com\/asarubbo\/poc\/blob\/master\/00130-mp3splt-badfree-free_options<\/a><\/p>\n<p><strong>Timeline:<\/strong><br \/>\n2017-01-01: private report to upstream via mail<br \/>\n2017-01-29: public upstream report on sourceforge<br \/>\n2017-01-29: blog post about the issue<br \/>\n2017-01-31: 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><br \/>\nhttps:\/\/blogs.gentoo.org\/ago\/2017\/01\/29\/mp3splt-invalid-free-in-free_options-options_manager-c<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: mp3splt is a command line utility to split mp3 and ogg files without decoding. A fuzz on it discovered an invalid free. The complete ASan output: # mp3splt -P -f -t 0.1 -a $FILE ==2631==ERROR: AddressSanitizer: attempting free on &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2017\/01\/29\/mp3splt-invalid-free-in-free_options-options_manager-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-iI","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1160"}],"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=1160"}],"version-history":[{"count":6,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1160\/revisions"}],"predecessor-version":[{"id":1207,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/1160\/revisions\/1207"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=1160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=1160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=1160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}