Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135768 - app-emulation/vmware-vmware-workstation: insecure tmp file use
Summary: app-emulation/vmware-vmware-workstation: insecure tmp file use
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Auditing (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Security
URL:
Whiteboard: B1 [ebuild?] DerCorny
Keywords:
Depends on: 91058
Blocks:
  Show dependency tree
 
Reported: 2006-06-06 07:21 UTC by Carsten Lohrke (RETIRED)
Modified: 2006-07-01 07:46 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 Carsten Lohrke (RETIRED) gentoo-dev 2006-06-06 07:21:34 UTC
To build the kernel modules, the admin has to run /opt/vmware/workstation/bin/vmware-config.pl, which creates /tmp/vmware-config{0,1,2}/. A user can symlink these directories before and place e.g. modified non-writable perl scripts, which would be executed by root.
Comment 1 Mike Auty (RETIRED) gentoo-dev 2006-06-06 13:40:18 UTC
As mentioned in bug 91058, we are working on a solution which will move at least some of the work done in /tmp/vmware-config*/ to the nice sandboxed location of a portage ebuild.  However, it doesn't look like it's gonna be hitting the tree anytime soon, please chat to Chris G about the release schedule for this enhancement...
Comment 2 Stefan Cornelius (RETIRED) gentoo-dev 2006-06-13 02:57:52 UTC
Any news?
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-06-13 15:04:17 UTC
Well, by "soon" we meant weeks, really.  We could try to patch the vmware-config.pl file for now, but my perl isn't all that good, so it'll be a while.

What course of action would security recommend?
Comment 4 Wolf Giesen (RETIRED) gentoo-dev 2006-06-13 15:30:18 UTC
My insignificant two cents: Giving a user access to vmware-workstations involves a lot of trust already. Having said this, I think it might be the best way to include a check to see whether the files to be created are there yet, which shouldn't be impossible to do (I know, the vmware scripts are like 7000 lines of bloat you never ever need and it's hell out there). The final solution would be to just dump the **** vmware comes with [as for the ESX "guest" stuff you just need one executable to deliver the heartbeat and life signs, for example] and everybody would congratulate you on that achievement I guess. If you absolutely can't find anybody else to touch the perl stuff, page me (perl's not my special love, either, but what can you say :[ )
Comment 5 Carsten Lohrke (RETIRED) gentoo-dev 2006-06-15 03:03:49 UTC
(In reply to comment #4)
> My insignificant two cents: Giving a user access to vmware-workstations
> involves a lot of trust already.

A user doesn't need to have access to vmware to carry the attack. A symlink placed in /tmp to a directory including a malicious file suffices.


Chris, I don't know how the security team thinks about it, but accoriding to the vulnerability policy
Comment 6 Carsten Lohrke (RETIRED) gentoo-dev 2006-06-15 03:03:49 UTC
(In reply to comment #4)
> My insignificant two cents: Giving a user access to vmware-workstations
> involves a lot of trust already.

A user doesn't need to have access to vmware to carry the attack. A symlink placed in /tmp to a directory including a malicious file suffices.


Chris, I don't know how the security team thinks about it, but accoriding to the vulnerability policy¹, I'd say the severity level is A1 or at least B1. Also VMwware needs to be informed. I didn't do so, yet, assuming the VMware team has upstream contacts.


[1] http://www.gentoo.org/security/en/vulnerability-policy.xml
Comment 7 Tuan Van (RETIRED) gentoo-dev 2006-06-15 09:32:09 UTC
(In reply to comment #0)
> To build the kernel modules, the admin has to run
> /opt/vmware/workstation/bin/vmware-config.pl, which creates
> /tmp/vmware-config{0,1,2}/. A user can symlink these directories before and
> place e.g. modified non-writable perl scripts, which would be executed by root.
> 

IIRC, vmware-config.pl will increment /tmp/vmware-configX to the next number if  /tmp/vmware-configX is exist. Not sure how you can perform a symlink attack.
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2006-06-15 15:06:45 UTC
We have no contacts within VMware, but http://www.vmware.com/company/contact.html has a link for reporting security bugs.
Comment 9 Wolf Giesen (RETIRED) gentoo-dev 2006-06-19 01:08:26 UTC
Look at #6; in my vmware-workstation-5.5.1.19175-r3's vmware-config.pl the handling of this starts in line 1545; I fail to see the window of attack, though.

Does anybody have a clearer view?
Comment 10 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-06-30 08:53:18 UTC
Any news on this one?
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2006-06-30 13:38:29 UTC
I haven't been able to look into it, but from what everyone is saying, it looks to be a non-issue.
Comment 12 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-07-01 00:08:51 UTC
Taviso do you agree?
Comment 13 Carsten Lohrke (RETIRED) gentoo-dev 2006-07-01 07:46:04 UTC
I've to admit that I didn't look at the perl script. Tuan is absolutely right of course.