Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 82631 - media-video/gv4l: arbitrary command execution
Summary: media-video/gv4l: arbitrary command execution
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo Security
URL:
Whiteboard: ~2? [upstream+ masked]
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-19 16:41 UTC by Benoit Boissinot
Modified: 2005-06-15 05:31 UTC (History)
1 user (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 Benoit Boissinot 2005-02-19 16:41:55 UTC
gv4l is a gui frontend to transcode. if you look at the source code it just looks
horrible:
everything is handled with the C function 'system' (grep system *|wc -l indicates there is 74 such calls).

But the worse is in the way it calls transcode: they just create a script in /tmp and execute it.

It permits another user to execute an arbitrary command as the user that run gv4l.

suppose it want him to run myscript.sh
he just have to do the following:

mkfifo /tmp/gv4l.sh ; chmod a+w /tmp/gv4l.sh
cat < /tmp/gv4l.sh ; rm /tmp/gv4l.sh ; ln -sf myscript.sh /tmp/gv4l.sh

Actually the script is executed...

In my opinion this application is broken (there are other part of the code that just are horrible: no error checking, doing things like system('rm -rf /tmp/gv4l* ') or system('sleep 1'))




Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Matthias Geerdsen (RETIRED) gentoo-dev 2005-02-23 12:25:26 UTC
media-video herd, pls comment/advise
Comment 2 Chris White (RETIRED) gentoo-dev 2005-03-02 07:06:24 UTC
I'm contacting upstream.  If they do not respond in one week I will remove the package from the tree.
Comment 3 Thierry Carrez (RETIRED) gentoo-dev 2005-03-15 02:20:12 UTC
Chris: probably time to mask it :)
Comment 4 Chris White (RETIRED) gentoo-dev 2005-03-18 12:01:33 UTC
Forgot to add comment, misunderstanding.

gv4l is maksed.
Comment 5 Thierry Carrez (RETIRED) gentoo-dev 2005-03-18 12:03:08 UTC
Out of main scope, pending removal
Comment 6 Thierry Carrez (RETIRED) gentoo-dev 2005-06-15 05:31:01 UTC
Removed.