Bug 736514 - SELinux is preventing /sbin/ifconfig from 'read' accesses on the file /run/vmware-active-nics.
Summary: SELinux is preventing /sbin/ifconfig from 'read' accesses on the file /run/vm...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:53e158252ba...
Depends On:
TreeView+ depends on / blocked
Reported: 2011-09-07 21:46 UTC by mtchr
Modified: 2012-03-07 03:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-09-12 18:56:33 UTC
Type: ---

Attachments (Terms of Use)

Description mtchr 2011-09-07 21:46:13 UTC
SELinux is preventing /sbin/ifconfig from 'read' accesses on the file /run/vmware-active-nics.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/run/vmware-active-nics default label should be vmware_host_pid_t.
Then you can run restorecon.
# /sbin/restorecon -v /run/vmware-active-nics

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that ifconfig should be allowed read access on the vmware-active-nics file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep ifconfig /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:ifconfig_t:s0
Target Context                system_u:object_r:init_var_run_t:s0
Target Objects                /run/vmware-active-nics [ file ]
Source                        ifconfig
Source Path                   /sbin/ifconfig
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           net-tools-1.60-117.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) #1 SMP Tue Aug
                              30 14:54:41 UTC 2011 i686 i686
Alert Count                   6
First Seen                    Mi 07 Sep 2011 21:01:12 CEST
Last Seen                     Mi 07 Sep 2011 21:05:43 CEST
Local ID                      fdf6d4be-77de-4fe8-9a1e-89c9b4043930

Raw Audit Messages
type=AVC msg=audit(1315422343.350:113): avc:  denied  { read } for  pid=23249 comm="ifconfig" path="/run/vmware-active-nics" dev=tmpfs ino=43976 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:init_var_run_t:s0 tclass=file

type=SYSCALL msg=audit(1315422343.350:113): arch=i386 syscall=execve success=yes exit=0 a0=9198fb8 a1=9198fa8 a2=91981e0 a3=9198fa8 items=0 ppid=23015 pid=23249 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=ifconfig exe=/sbin/ifconfig subj=system_u:system_r:ifconfig_t:s0 key=(null)

Hash: ifconfig,ifconfig_t,init_var_run_t,file,read


#============= ifconfig_t ==============
allow ifconfig_t init_var_run_t:file read;

audit2allow -R

#============= ifconfig_t ==============
allow ifconfig_t init_var_run_t:file read;

Comment 1 Miroslav Grepl 2011-09-08 11:43:55 UTC
Looks like an apps is leaking. Do you want what you were doing when this happened. Probably this relates with vmware.

Comment 2 Daniel Walsh 2011-09-08 12:57:06 UTC
Looks like whoever opens the file /run/vmware-active-nics is leaking the file descriptor to ifconfig.  Running restorecon on the /run should fix the label but the problem is the vmware instance is probably running with the wrong label.

ps -eZ | grep initrc_t

Comment 3 mtchr 2011-09-08 17:57:21 UTC
@Comment1: Yes I wanted to install and configure the vmware tools by the pl-file as instructed by them. I initiated the process at the command-line by hand.

I've not succeeded in installing the whole thing completely. As far as I have googled that might partially(?) be the fault of that vmware-script. (may not be related to this issue)

I'm not a pro, if I can/should provide specific info please instruct on how to obtain them.

Comment 4 Miroslav Grepl 2011-09-09 05:35:43 UTC
Just run in terminal

# ps -eZ | grep initrc_t

Comment 5 mtchr 2011-09-12 16:27:33 UTC
That results in the following output:
system_u:system_r:initrc_t:s0    1111 ?        00:00:00 lldpad
system_u:system_r:initrc_t:s0    1185 ?        00:00:00 tpvmlp

Comment 6 Daniel Walsh 2011-09-12 18:56:33 UTC
Looks like it is tpvmlp, which has shown itself to leak in the past.

I would just dontaudit this

# grep init_var_run_t /var/log/audit/audit.log | audit2alow -D -M myifconfig
# semodule -i myifconfig.pp

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