Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 294106 - <media-sound/mpg123-1.9.2 uses libtool in a insecure way
Summary: <media-sound/mpg123-1.9.2 uses libtool in a insecure way
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL: http://sourceforge.net/tracker/?func=...
Whiteboard: B3 [noglsa]
Keywords:
Depends on:
Blocks: CVE-2009-3736
  Show dependency tree
 
Reported: 2009-11-22 21:33 UTC by Shark
Modified: 2011-07-18 18:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Diff -u from mpg-123 1.9.0 (ebuild.diff,633 bytes, patch)
2009-11-24 12:04 UTC, Shark
Details | Diff
Libtool-2.2.6b compatibility patch from http://www.mpg123.org/cgi-bin/viewvc.cgi/trunk/src/module.c?r1=2377&r2=2446&sortby=date (mpg123-libtool.patch,891 bytes, patch)
2009-11-24 12:06 UTC, Shark
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shark 2009-11-22 21:33:49 UTC
After installing libtool-2.2.6b mpg123 stops working with the following error
"[module.c:138] error: Failed to open module alsa: file not found
 [module.c:138] error: Failed to open module dummy: file not found
"
According to libtool's changelog 
"Don't load module.la from current directory by default.
	* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
	unqualified module.la file from the current directory (by
	default) since doing so is insecure and is not compliant with
	the documentation."
Last version of mpg123 (1.9.2, not yet in portage) is still affected, upstream seems aware of the problem.

Reproducible: Always
Comment 1 Frank Goubert 2009-11-23 20:19:21 UTC
Same here with libtool-2.2.6b:

[module.c:138] error: Failed to open module alsa: file not found                                    
[module.c:138] error: Failed to open module sdl: file not found                                     
[module.c:138] error: Failed to open module jack: file not found                                    
[audio.c:180] error: Unable to find a working output module in this list: alsa,sdl,jack             
[audio.c:527] error: Failed to open audio output module                                             
[mpg123.c:779] error: Failed to initialize output, goodbye.

Problem solved after downgrading to sys-devel/libtool-2.2.6a

Comment 2 Shark 2009-11-24 12:03:10 UTC
the lastest upstream commit fixes this bug, i've tried a quick hack to the ebuild (version bump+libtool patch) and 1.9.2+libtools-2.2.6b now works here.
Comment 3 Shark 2009-11-24 12:04:41 UTC
Created attachment 211056 [details, diff]
Diff -u from mpg-123 1.9.0
Comment 4 Shark 2009-11-24 12:06:48 UTC
Created attachment 211057 [details, diff]
Libtool-2.2.6b compatibility patch from http://www.mpg123.org/cgi-bin/viewvc.cgi/trunk/src/module.c?r1=2377&r2=2446&sortby=date
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2009-12-01 18:27:39 UTC
@security: Please (re)read the first comment. If I'm not mistaken, you can run arbituary plugins (arbitrary code execution) long as you have write access to the directory mpg123 is ran from and pkgs like net-misc/liveice (servers) are using this. Wouldn't this cause pretty much any security situation, including privilege escalations?

That said, it's now bumped in portage,
 
*mpg123-1.9.2 (01 Dec 2009)

  01 Dec 2009; Samuli Suominen <ssuominen@gentoo.org> +mpg123-1.9.2.ebuild,
  +files/mpg123-1.9.2-libtool.patch:
  Version bump wrt #294106, thanks to Shark <shark at bitchx.it> for
  reporting. Fix ABI handling wrt #295075, thanks to Ferret <ferret at
  explodingferret.com> for reporting.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2009-12-01 18:49:32 UTC
Ok, it looks like it's only a problem if LD_LIBRARY_PATH is set to "." as per IRC discussion. And requesting it stable, to prevent people from doing dummy things,

Please test and mark stable =media-sound/mpg123-1.9.2
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2009-12-02 20:03:42 UTC
Stable for HPPA.
Comment 8 Markus Meier gentoo-dev 2009-12-03 11:24:51 UTC
amd64/x86 stable
Comment 9 Brent Baude (RETIRED) gentoo-dev 2009-12-03 20:41:35 UTC
ppc64 done
Comment 10 Tiago Cunha (RETIRED) gentoo-dev 2009-12-07 17:15:48 UTC
sparc stable
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2009-12-09 14:52:46 UTC
Stable for PPC.
Comment 12 Raúl Porcel (RETIRED) gentoo-dev 2009-12-09 17:44:22 UTC
alpha/ia64 stable, closing
Comment 13 Stefan Behte (RETIRED) gentoo-dev Security 2009-12-11 00:42:37 UTC
Not so fast. GLSA request filed, waiting for GLSA to be magically produced...
Comment 14 Shark 2009-12-11 22:59:40 UTC
Upstream has released mpg123-1.10.0 which incorporate the libtool patch.
Comment 15 Pacho Ramos gentoo-dev 2009-12-27 19:51:30 UTC
Sorry, I have seen that this is assigned to security, reverting summary change since maybe this bug will be used for GLSA
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2010-04-25 13:37:47 UTC
doesn't need glsa, imho. 
removing sound@ from CC now, if you need us, please add back.
Comment 17 Tim Harder gentoo-dev 2011-07-18 06:56:26 UTC
This should probably be closed this the version doesn't exist in the tree anymore.
Comment 18 Stefan Behte (RETIRED) gentoo-dev Security 2011-07-18 18:17:48 UTC
Vote: NO, too. Closing noglsa.