Bug 728574

Summary: SELinux is preventing /sbin/setfiles from 'getattr' accesses on the filesystem /sys.
Product: [Fedora] Fedora Reporter: Mads Kiilerich <mads>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:5c6f399112044bfc6587b8de37d4acc2779917842382e0bdae78fdf96fb915b4
Fixed In Version: selinux-policy-3.10.0-18.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-23 20:25:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mads Kiilerich 2011-08-05 16:23:24 UTC
abrt version: 2.0.5
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.0.0-4.1.fc16.i686.PAE
reason:         SELinux is preventing /sbin/setfiles from 'getattr' accesses on the filesystem /sys.
time:           Fri Aug  5 18:23:20 2011

description:
:SELinux is preventing /sbin/setfiles from 'getattr' accesses on the filesystem /sys.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that setfiles should be allowed getattr access on the sys filesystem 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 restorecon /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:unconfined_r:setfiles_mac_t:s0-s0:c0.
:                              c1023
:Target Context                system_u:object_r:sysfs_t:s0
:Target Objects                /sys [ filesystem ]
:Source                        restorecon
:Source Path                   /sbin/setfiles
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           policycoreutils-2.0.86-18.fc16
:Target RPM Packages           filesystem-2.4.43-1.fc16
:Policy RPM                    selinux-policy-3.10.0-15.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed)
:                              3.0.0-4.1.fc16.i686.PAE #1 SMP Thu Aug 4 19:22:07
:                              UTC 2011 i686 i686
:Alert Count                   1
:First Seen                    Fri 05 Aug 2011 06:20:31 PM CEST
:Last Seen                     Fri 05 Aug 2011 06:20:31 PM CEST
:Local ID                      0edb9c30-9c5b-4e9a-948c-a04440e71a70
:
:Raw Audit Messages
:type=AVC msg=audit(1312561231.249:168): avc:  denied  { getattr } for  pid=3158 comm="restorecon" name="/" dev=sysfs ino=1 scontext=unconfined_u:unconfined_r:setfiles_mac_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=filesystem
:
:
:type=SYSCALL msg=audit(1312561231.249:168): arch=i386 syscall=statfs64 success=yes exit=0 a0=37f7ab a1=54 a2=bff0b3ac a3=37f7ab items=0 ppid=3156 pid=3158 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=3 comm=restorecon exe=/sbin/setfiles subj=unconfined_u:unconfined_r:setfiles_mac_t:s0-s0:c0.c1023 key=(null)
:
:Hash: restorecon,setfiles_mac_t,sysfs_t,filesystem,getattr
:
:audit2allow
:
:#============= setfiles_mac_t ==============
:allow setfiles_mac_t sysfs_t:filesystem getattr;
:
:audit2allow -R
:
:#============= setfiles_mac_t ==============
:allow setfiles_mac_t sysfs_t:filesystem getattr;
:

Comment 1 Mads Kiilerich 2011-08-05 16:37:44 UTC
This happened while building with livecd-creator in permissive mode, so I guess it was run inside the chroot.

Comment 2 Daniel Walsh 2011-08-05 17:30:13 UTC
Fixed in selinux-policy-3.10.0-16.fc16

Comment 3 Fedora Update System 2011-08-11 20:34:48 UTC
selinux-policy-3.10.0-18.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-18.fc16

Comment 4 Fedora Update System 2011-08-12 04:22:09 UTC
Package selinux-policy-3.10.0-18.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-18.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-18.fc16
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-08-23 20:25:00 UTC
selinux-policy-3.10.0-18.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.