Bug 737803

Summary: SELinux is preventing /usr/sbin/collectd from 'read' accesses on the lnk_file hwmon0.
Product: [Fedora] Fedora Reporter: Jeff Raber <jeff.raber>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:39daea8a18e611dff9039e6cd31c726eeae12f4fa3888a477be95e040e31ab91
Fixed In Version: selinux-policy-3.9.16-48.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-04 02:35:25 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 Jeff Raber 2011-09-13 07:08:55 UTC
SELinux is preventing /usr/sbin/collectd from 'read' accesses on the lnk_file hwmon0.

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

If you believe that collectd should be allowed read access on the hwmon0 lnk_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 collectd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:collectd_t:s0
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                hwmon0 [ lnk_file ]
Source                        collectd
Source Path                   /usr/sbin/collectd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           collectd-4.10.3-2.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)
                              2.6.38.8-35.fc15.x86_64 #1 SMP Wed Jul 6 13:58:54
                              UTC 2011 x86_64 x86_64
Alert Count                   95
First Seen                    Mon 12 Sep 2011 11:44:17 PM CDT
Last Seen                     Tue 13 Sep 2011 02:08:17 AM CDT
Local ID                      478e7c06-d393-4e1a-9828-7abd0c4955c9

Raw Audit Messages
type=AVC msg=audit(1315897697.716:3038): avc:  denied  { read } for  pid=1660 comm="collectd" name="hwmon0" dev=sysfs ino=16629 scontext=system_u:system_r:collectd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=lnk_file


type=SYSCALL msg=audit(1315897697.716:3038): arch=x86_64 syscall=open success=yes exit=ENXIO a0=7f2421e4cbf0 a1=0 a2=1b6 a3=9 items=0 ppid=1 pid=1660 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=collectd exe=/usr/sbin/collectd subj=system_u:system_r:collectd_t:s0 key=(null)

Hash: collectd,collectd_t,sysfs_t,lnk_file,read

audit2allow

#============= collectd_t ==============
allow collectd_t sysfs_t:lnk_file read;

audit2allow -R

#============= collectd_t ==============
allow collectd_t sysfs_t:lnk_file read;

Comment 1 Miroslav Grepl 2011-09-13 11:47:02 UTC
Fixed in selinux-policy-3.9.16-41.fc15

Comment 2 Fedora Update System 2011-11-16 16:17:13 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 3 Fedora Update System 2011-11-17 23:35:35 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 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.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2011-12-04 02:35:25 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.