Bug 737802 - SELinux is preventing /usr/sbin/collectd from 'getattr' accesses on the filesystem /dev/mqueue.
Summary: SELinux is preventing /usr/sbin/collectd from 'getattr' accesses on the files...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:6181bdc306a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-13 07:07 UTC by Jeff Raber
Modified: 2011-12-04 02:35 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.9.16-48.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-04 02:35:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
/var/log/audit.log, as requested (54.50 KB, application/x-xz)
2011-09-13 19:52 UTC, Jeff Raber
no flags Details

Description Jeff Raber 2011-09-13 07:07:47 UTC
SELinux is preventing /usr/sbin/collectd from 'getattr' accesses on the filesystem /dev/mqueue.

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

If you believe that collectd should be allowed getattr access on the mqueue 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 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:tmpfs_t:s0
Target Objects                /dev/mqueue [ filesystem ]
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                   101
First Seen                    Mon 12 Sep 2011 11:44:17 PM CDT
Last Seen                     Tue 13 Sep 2011 02:06:37 AM CDT
Local ID                      73b627ff-294f-4c8b-a096-37fac76e8496

Raw Audit Messages
type=AVC msg=audit(1315897597.797:3006): avc:  denied  { getattr } for  pid=1661 comm="collectd" name="/" dev=mqueue ino=7013 scontext=system_u:system_r:collectd_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=filesystem


type=SYSCALL msg=audit(1315897597.797:3006): arch=x86_64 syscall=statfs success=yes exit=0 a0=7f2414006880 a1=7f242164b7d0 a2=0 a3=1 items=0 ppid=1 pid=1661 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,tmpfs_t,filesystem,getattr

audit2allow

#============= collectd_t ==============
allow collectd_t tmpfs_t:filesystem getattr;

audit2allow -R

#============= collectd_t ==============
allow collectd_t tmpfs_t:filesystem getattr;

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

Comment 2 Jeff Raber 2011-09-13 13:28:45 UTC
Hi Miroslav.  I have another 34 AVC's related to collectd, should I file them all as bugs?  Or is there a more efficient way?

Comment 3 Miroslav Grepl 2011-09-13 13:36:05 UTC
Hi Jeff,
could you attach your compressed /var/log/audit/audit.log

Comment 4 Jeff Raber 2011-09-13 19:52:42 UTC
Created attachment 522993 [details]
/var/log/audit.log, as requested

Comment 5 Jeff Raber 2011-09-29 14:39:26 UTC
Miroslav,
Any idea when selinux-policy-3.9.16-41.fc15 will be ready?  Do you think the AVC's in comment 4 will be resolved with that update as well?

collectd is triggering an AVC every few seconds.  I've been holding out on creating a custom policy (really because I've never done it before) but if you don't think that the update will be coming soon, I will create one.

Comment 6 Miroslav Grepl 2011-09-29 14:46:57 UTC
I apologize, I missed your latest comment with your audit.log. Going to look at it.

Comment 7 Miroslav Grepl 2011-10-07 15:20:36 UTC
Fixes added to selinux-policy-3.9.16-43.fc15

Comment 8 Fedora Update System 2011-11-16 16:17:08 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 9 Fedora Update System 2011-11-17 23:35:31 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 10 Fedora Update System 2011-12-04 02:35:15 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.


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