Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 109834 - media-libs/yiff runs as root and opens any file a client asks for
Summary: media-libs/yiff runs as root and opens any file a client asks for
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Default Configs (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard: jaervosz
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-19 10:37 UTC by Sune Kloppenborg Jeppesen (RETIRED)
Modified: 2006-07-09 14:09 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 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-10-19 10:37:51 UTC
Not sure wether we are affected by this one: 
 
The yiff server, by default, will run as the root user, even though it  
only requires privileges to access the audio devices (/dev/dsp and  
/dev/mixer), no effort is make by the package to create an specific user  
and run the server as such.  
  
This means that this opens up yiff-server to, at least, local attacks,  
since the localhost is always allowed access to the yiff server. Thus, a  
rogue (local) user can get the yiff-server to (try to) open up any local  
file. This can have bad consequences if a local user forces the yiff  
server to open up a device file if even reading it might be dangerous  
(consider the case, for example, if you can make the server read a hard  
disk drive).  
  
  
The server does not make any effort to review the files it is requested,  
it will just open whatever is provided and try to determine if it's a  
Wav, Voc, or Raw file and try to play it.  
  
This day and age, servers like yiff should run  
  
a) under a non-priviledged user  
b) chrooted, if possible, so that it will only be able to access a set  
   of files  
c) do input checks to prevent it from going places it did not expect,  
   for example, the server could only allow relative patchs and resolve  
   them to a fixed directory (/var/spool/yiff or whatever)  
  
It looks like the code of the server has not been audited for security  
issues, which adds even more reasons to have this running as non-root in  
the default Debian installation.  
  
Regards  
  
Javier
Comment 1 Thierry Carrez (RETIRED) gentoo-dev 2005-10-20 08:19:02 UTC
I guess we would run it as user in the "sound" group... No "need" to run as root
under Gentoo I guess.

vapier, your opinion as the yiff guy ?
Comment 2 Thierry Carrez (RETIRED) gentoo-dev 2005-10-22 06:19:23 UTC
We don't provide an init script afaict so it's more the responsability of the
user to choose under which rights it would run. But it should nevertheless be
fixed (either documenting the problem or adding filters on what should not be
opened).

Setting to Default Configs.
Comment 3 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-11-11 00:59:55 UTC
CC'ing maintainer (sorry for the delay). 
Comment 4 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-11-19 10:05:22 UTC
Sound please advise. 
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-18 12:52:31 UTC
As vapier added and bumped it in the past, probably he's the one who should take care of this.
I saw eradicator done some work on that, but he's occupied and I don't have knowledge of yiff to help, and probably the same for the rest of sound herd.
Comment 6 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-01-25 13:36:31 UTC
vapier any news on this one?
Comment 7 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-02-06 12:11:20 UTC
Vapier any news on this one?
Comment 8 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-04-07 23:17:00 UTC
Vapier any news on this one?
Comment 9 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-04-20 09:13:23 UTC
vapier any news on this one?
Comment 10 solar (RETIRED) gentoo-dev 2006-07-09 11:15:51 UTC
I don't see anything calling yiff as root. As Koon pointed out there is also no 
initscripts. And no config files. (just docs) ; A user should be no more inclined 
to run this as root more than any other program. This bug imo can be closed as is 
unless we want to audit the source for fun.
Comment 11 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-07-09 14:09:09 UTC
Thx Solar.