Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135251 - media-sound/xmcd: DoS by disk consumption (world-writable dir) (CVE-2006-2542)
Summary: media-sound/xmcd: DoS by disk consumption (world-writable dir) (CVE-2006-2542)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High minor
Assignee: Gentoo Security
URL: http://cve.mitre.org/cgi-bin/cvename....
Whiteboard: B3 [noglsa masked] Falco
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-02 03:47 UTC by Raphael Marichez (Falco) (RETIRED)
Modified: 2006-11-27 05:19 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-06-02 03:47:23 UTC
http://secunia.com/advisories/20078
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-2542

xmcd-3.3.2 :
/var/lib/xmcd is drwxr-wr-w
/var/lib/xmcd/discog is drwxrwxrwx

every local user can write to this directory.

** if the vulnerable directory is not empty (has been used by a user), "emerge -C xmcd" doesn't delete the vulnerable directory !! **



Debian has issue a big patch for this (DSA 1086-1) (concerning other issues as well).
It might not be too difficult to patch our version (?)
Comment 1 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-06-02 03:50:28 UTC
you can see http://security.debian.org/pool/updates/main/x/xmcd/xmcd_2.6-14woody1.diff.gz
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-06-02 05:01:08 UTC
Would it be enough to make sure that the directories are 0755 in ebuild? both code and build system is a mess (imake), the less I have to deal with it the best (and the debian's patch is for a completely different version).
Comment 3 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-06-02 05:09:14 UTC
(In reply to comment #2)
> Would it be enough to make sure that the directories are 0755 in ebuild? both
> code and build system is a mess (imake), the less I have to deal with it the
> best (and the debian's patch is for a completely different version).
> 

i'm not sure. I'm afraid that the "0777" is fixed by the program itself, not only by the ebuild. I don't have time to investigate into this atm.
Comment 4 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-06-18 03:07:32 UTC
An ebuild patch seems to be sufficient, in pkg_postinst(), AFAICT looking at the debian patch



+chown -R root.audio /var/lib/cddb
+find /var/lib/cddb -type d -print0 | xargs -0r chmod 3775
+# permissions used to be 666!
+chmod -R o-w /var/lib/cddb
Comment 5 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-06-30 09:22:44 UTC
Falco is this one ready for ebuild status?
Comment 6 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-07-06 15:14:03 UTC
(In reply to comment #5)
> Falco is this one ready for ebuild status?
> 

I think an ebuild patch will be enough, in pkg_postinst(). But i would like to receive a confirmation.
Comment 7 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-07-24 07:12:05 UTC
Any news on this one?
Comment 8 Thierry Carrez (RETIRED) gentoo-dev 2006-07-29 05:43:51 UTC
sound team please advise
Comment 9 Thomas Cort (RETIRED) gentoo-dev 2006-08-12 21:32:58 UTC
(In reply to comment #8)
> sound team please advise

I can confirm that the directory is world writable...

/var/lib/xmcd/ drwxr-xr-x root root
/var/lib/xmcd/discog drwxrwxrwx root root


Patching the ebuild in pkg_postinst() with this seems to work...


+       chown -R root.audio /var/lib/xmcd
+       find /var/lib/xmcd -type d -print0 | xargs -0r chmod 3775
+       # permissions used to be 666!
+       chmod -R o-w /var/lib/xmcd


New permissions...

/var/lib/xmcd/ drwxrwsr-t  root audio
/var/lib/xmcd/discog drwxrwsr-t root audio

I haven't bumped this in portage yet because I cannot get xmcd working to test it. It has a strange wrapper script ( /usr/X11R6/lib/X11/xmcd/bin-*/start ) which needs to be run to setup the env, but it keeps complaining saying that I need to own the CD-ROM device or have /usr/X11R6/lib/X11/xmcd/bin-*/{xmcd,cda} setuid. I chown'd /dev/cdrom and /dev/hdc and set both of the files setuid, but it still would not start. It doesn't work when I try it as root either.

Can someone from the sound team please test xmcd with the ebuild change mentioned above to make sure that xmcd still functions properly and doesn't change the permissions of /var/lib/xmcd/* back? Then, please commit the ebuild change above.
Comment 10 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-08-24 11:12:46 UTC
Sound please advise.
Comment 11 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-09-05 06:04:34 UTC
Sound please advise.
Comment 12 Thomas Cort (RETIRED) gentoo-dev 2006-09-08 10:47:02 UTC
(In reply to comment #11)
> Sound please advise.

I can't get xmcd to work (see comment #9). Unless someone from the sound team who has more knowledge about it than me steps up, I would suggest masking and removing it.
Comment 13 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-09-13 23:07:00 UTC
I suggest masking this one, comments?
Comment 14 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-09-26 09:21:04 UTC
Security/Sound any comments?
Comment 15 Tavis Ormandy (RETIRED) gentoo-dev 2006-09-26 09:47:42 UTC
sound team, is there a reason this trivial fix hasnt been committed yet?
Comment 16 Thomas Cort (RETIRED) gentoo-dev 2006-09-26 14:33:58 UTC
(In reply to comment #15)
> sound team, is there a reason this trivial fix hasnt been committed yet?

Because I can't get xmcd working to test it (see Comment #9) and no one from the sound team is interested in this package.
Comment 17 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-09-27 00:28:32 UTC
Ok, then I think we should mask it. Security do you agree?
Comment 18 Wolf Giesen (RETIRED) gentoo-dev 2006-09-27 00:33:51 UTC
Definitely. Autocount frilled++ on masking .-)
Comment 19 Jeremy Huddleston (RETIRED) gentoo-dev 2006-10-16 12:28:13 UTC
This package is dead upstream, nobody seems to care about maintaining it here, and  the only updates have been virtual x, and similar.  It is not a dependency for any other package.  I've removed it from portage.
Comment 20 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-11-24 12:17:31 UTC
Time for late GLSA decision on this one.

I tend to vote NO.
Comment 21 Tavis Ormandy (RETIRED) gentoo-dev 2006-11-24 12:24:56 UTC
NO also.
Comment 22 Wolf Giesen (RETIRED) gentoo-dev 2006-11-27 03:00:27 UTC
No++.
Comment 23 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-11-27 05:19:32 UTC
Closing without GLSA.