Bug 484767 - SELinux prevents VMWare Tools mounting HGFS
SELinux prevents VMWare Tools mounting HGFS
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2009-02-09 15:18 EST by Derek Atkins
Modified: 2009-11-18 06:25 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-11-18 06:25:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Derek Atkins 2009-02-09 15:18:19 EST
Description of problem:

Running VMWare Tools within a Fedora 10 OS in a VMWare-Server-2 Guest VM I get the following policy violation:


SELinux prevented mount from mounting on the file or directory
"./vmware-hgfsmounter" (type "vmware_host_exec_t").

Detailed Description:

SELinux prevented mount from mounting a filesystem on the file or directory
"./vmware-hgfsmounter" of type "vmware_host_exec_t". By default SELinux limits
the mounting of filesystems to only some files or directories (those with types
that have the mountpoint attribute). The type "vmware_host_exec_t" does not have
this attribute. You can either relabel the file or directory or set the boolean
"allow_mount_anyfile" to true to allow mounting on any file or directory.

Allowing Access:

Changing the "allow_mount_anyfile" boolean to true will allow this access:
"setsebool -P allow_mount_anyfile=1."

Fix Command:

setsebool -P allow_mount_anyfile=1

Additional Information:

Source Context                system_u:system_r:mount_t:s0-s0:c0.c1023
Target Context                system_u:object_r:vmware_host_exec_t:s0
Target Objects                ./vmware-hgfsmounter [ file ]
Source                        mount
Source Path                   /bin/mount
Port                          <Unknown>
Host                          code.gnucash.org
Source RPM Packages           util-linux-ng-2.14.1-3.2.fc10
Target RPM Packages           
Policy RPM                    selinux-policy-3.5.13-41.fc10
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   allow_mount_anyfile
Host Name                     code.gnucash.org
Platform                      Linux code.gnucash.org
                              #1 SMP Wed Jan 21 02:09:37 EST 2009 i686 athlon
Alert Count                   8
First Seen                    Wed 28 Jan 2009 03:42:12 PM EST
Last Seen                     Sun 08 Feb 2009 11:25:39 AM EST
Local ID                      1cd66aaa-1d5c-4ad0-8451-2a0c3be13080
Line Numbers                  

Raw Audit Messages            

node=code.gnucash.org type=AVC msg=audit(1234110339.527:7): avc:  denied  { execute } for  pid=2384 comm="mount" name="vmware-hgfsmounter" dev=dm-0 ino=1351680 scontext=system_u:system_r:mount_t:s0-s0:c0.c1023 tcontext=system_u:object_r:vmware_host_exec_t:s0 tclass=file

node=code.gnucash.org type=SYSCALL msg=audit(1234110339.527:7): arch=40000003 syscall=11 success=no exit=-13 a0=bf926b60 a1=bf926b34 a2=1ca8520 a3=bf926b34 items=0 ppid=2383 pid=2384 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="mount" exe="/bin/mount" subj=system_u:system_r:mount_t:s0-s0:c0.c1023 key=(null)

Version-Release number of selected component (if applicable):


How reproducible:

Seems to happen all the time when the system boots up.

Steps to Reproduce:
1. install vmware-tools
2. boot up the system
3. login
4. look at the audit logs
Actual results:

See the audit log above.

Expected results:

mount should be able to mount the vmware hgfs.

Additional info:
Comment 1 Daniel Walsh 2009-02-10 15:55:14 EST
This is a mislabeled file.

Miroslav these lines should be removed from vmware.fc

/usr/lib/vmware-tools/sbin32/vmware.* -- gen_context(system_u:object_r:vmware_host_exec_t,s0)
/usr/lib/vmware-tools/sbin64/vmware.* -- gen_context(system_u:object_r:vmware_host_exec_t,s0)

Derick, if you execute

chcon -R -t bin_t /usr/lib/vmware-tools/sbin32/
chcon -R -t bin_t /usr/lib/vmware-tools/sbin64/

It should fix it until the policy is updated.
Comment 2 Derek Atkins 2009-02-10 16:39:25 EST
Thanks Daniel.
Hopefully a restorecon wont get run in the interim.  ;)
Comment 3 Miroslav Grepl 2009-02-12 10:08:59 EST
Fixed in selinux-policy-3.5.13-45.fc10
Comment 4 Bug Zapper 2009-11-18 06:04:08 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Note You need to log in before you can comment on or make changes to this bug.