Bug 917279

Summary: SELinux is preventing /usr/sbin/collectd from create access on the netlink_tcpdiag_socket
Product: [Fedora] Fedora Reporter: Joel Uckelman <uckelman>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-14 03:03:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joel Uckelman 2013-03-02 16:36:25 UTC
Description of problem:

SELinux is preventing /usr/sbin/collectd from create access on the netlink_tcpdiag_socket .

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

If you believe that collectd should be allowed create access on the  netlink_tcpdiag_socket 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:system_r:collectd_t:s0
Target Objects                 [ netlink_tcpdiag_socket ]
Source                        collectd
Source Path                   /usr/sbin/collectd
Port                          <Unknown>
Host                          clio
Source RPM Packages           collectd-5.2.0-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-81.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     clio
Platform                      Linux clio 3.7.9-205.fc18.x86_64 #1 SMP Sun Feb 24
                              20:10:02 UTC 2013 x86_64 x86_64
Alert Count                   14
First Seen                    2013-03-02 18:48:18 CET
Last Seen                     2013-03-02 17:33:59 CET
Local ID                      80b735af-d38d-4440-a8dd-6cfc5abcb5c7

Raw Audit Messages
type=AVC msg=audit(1362242039.719:1950): avc:  denied  { create } for  pid=7162 comm="collectd" scontext=system_u:system_r:collectd_t:s0 tcontext=system_u:system_r:collectd_t:s0 tclass=netlink_tcpdiag_socket


type=SYSCALL msg=audit(1362242039.719:1950): arch=x86_64 syscall=socket success=no exit=EACCES a0=10 a1=3 a2=4 a3=7fa97e7f9ad0 items=0 ppid=1 pid=7162 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=collectd exe=/usr/sbin/collectd subj=system_u:system_r:collectd_t:s0 key=(null)

Hash: collectd,collectd_t,collectd_t,netlink_tcpdiag_socket,create

audit2allow

#============= collectd_t ==============
allow collectd_t self:netlink_tcpdiag_socket create;

audit2allow -R

#============= collectd_t ==============
allow collectd_t self:netlink_tcpdiag_socket create;


How reproducible:

Always

Steps to Reproduce:
1. Enable the collectd tcpconns plugin.

Comment 1 Miroslav Grepl 2013-03-04 09:45:13 UTC
*** Bug 917281 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2013-03-04 10:02:54 UTC
Fixed in  selinux-policy-3.11.1-82.fc18.noarch

Comment 3 Fedora Update System 2013-03-04 12:12:14 UTC
selinux-policy-3.11.1-83.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-83.fc18

Comment 4 Fedora Update System 2013-03-04 22:35:02 UTC
Package selinux-policy-3.11.1-83.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-83.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3398/selinux-policy-3.11.1-83.fc18
then log in and leave karma (feedback).

Comment 5 Joel Uckelman 2013-03-05 22:39:12 UTC
I tested selinux-policy-3.11.1-83.fc18. It works for me. Thanks!

Comment 6 Fedora Update System 2013-03-08 16:12:10 UTC
selinux-policy-3.11.1-84.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-84.fc18

Comment 7 Fedora Update System 2013-03-14 03:03:23 UTC
selinux-policy-3.11.1-85.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.