Bug 729228

Summary: SELinux is preventing /sbin/ifconfig from 'getattr' accesses on the file /proc/<pid>/net/dev.
Product: [Fedora] Fedora Reporter: Michal Nowak <mnowak>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: doctore, dominick.grift, dwalsh, mgrepl, mnowak, ohudlick
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:2c652d97bb2ac4f2283243c519abbbd4420493d94fa6b8ccc4a676e97421edf7
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-07 14:56:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michal Nowak 2011-08-09 06:26:11 UTC
SELinux is preventing /sbin/ifconfig from 'getattr' accesses on the file /proc/<pid>/net/dev.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that ifconfig should be allowed getattr access on the dev file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
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:colord_t:s0-s0:c0.c1023
Target Context                system_u:object_r:proc_net_t:s0
Target Objects                /proc/<pid>/net/dev [ file ]
Source                        ifconfig
Source Path                   /sbin/ifconfig
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           net-tools-1.60-117.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-35.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.1-1.fc15.x86_64 #1 SMP Sat Aug
                              6 05:34:18 UTC 2011 x86_64 x86_64
Alert Count                   61
First Seen                    Sun 03 Jul 2011 09:19:04 PM CEST
Last Seen                     Mon 08 Aug 2011 05:30:36 PM CEST
Local ID                      506b61b1-a89e-45ee-9895-f283091c73a0

Raw Audit Messages
type=AVC msg=audit(1312817436.567:72): avc:  denied  { getattr } for  pid=1455 comm="ifconfig" path="/proc/1455/net/dev" dev=proc ino=4026531973 scontext=system_u:system_r:colord_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_net_t:s0 tclass=file


type=SYSCALL msg=audit(1312817436.567:72): arch=x86_64 syscall=fstat success=yes exit=0 a0=8 a1=7fff23a057c0 a2=7fff23a057c0 a3=2 items=0 ppid=1437 pid=1455 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:colord_t:s0-s0:c0.c1023 key=(null)

Hash: ifconfig,colord_t,proc_net_t,file,getattr

audit2allow

#============= colord_t ==============
allow colord_t proc_net_t:file getattr;

audit2allow -R

#============= colord_t ==============
allow colord_t proc_net_t:file getattr;

Comment 1 Michal Nowak 2011-08-09 06:28:52 UTC
System woke-up after hibernation.