Bug 960157 - SELinux is preventing /usr/sbin/collectd from name_bind access on the udp_socket
Summary: SELinux is preventing /usr/sbin/collectd from name_bind access on the udp_socket
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-06 15:14 UTC by Joel Uckelman
Modified: 2014-01-05 06:08 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.11.1-108.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-05 06:08:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Joel Uckelman 2013-05-06 15:14:58 UTC
Description of problem:

SELinux is preventing /usr/sbin/collectd from name_bind access on the udp_socket .

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

If you believe that collectd should be allowed name_bind access on the  udp_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:object_r:unreserved_port_t:s0
Target Objects                 [ udp_socket ]
Source                        collectd
Source Path                   /usr/sbin/collectd
Port                          25826
Host                          hydra.ellipsis.cx
Source RPM Packages           collectd-5.2.0-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-92.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     hydra.ellipsis.cx
Platform                      Linux hydra.ellipsis.cx 3.8.11-200.fc18.x86_64 #1
                              SMP Wed May 1 19:44:27 UTC 2013 x86_64 x86_64
Alert Count                   275102
First Seen                    2012-03-22 21:55:39 CET
Last Seen                     2013-05-06 17:12:43 CEST
Local ID                      ff17087f-6ef5-4bbc-b851-38ecba4507b4

Raw Audit Messages
type=AVC msg=audit(1367853163.873:8155): avc:  denied  { name_bind } for  pid=4009 comm="collectd" src=25826 scontext=system_u:system_r:collectd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=udp_socket


type=SYSCALL msg=audit(1367853163.873:8155): arch=x86_64 syscall=bind success=no exit=EACCES a0=4 a1=99ead0 a2=10 a3=7fff6eb5d634 items=0 ppid=1 pid=4009 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,unreserved_port_t,udp_socket,name_bind

audit2allow

#============= collectd_t ==============
allow collectd_t unreserved_port_t:udp_socket name_bind;

audit2allow -R
require {
        type collectd_t;
}

#============= collectd_t ==============
corenet_udp_bind_generic_port(collectd_t)



Version-Release number of selected component (if applicable):

selinux-policy-3.11.1-92.fc18.noarch


How reproducible:

Always

Steps to Reproduce:
1. Enable collectd network plugin.
2. Configure the network plugin as a Server.
  
Actual results:

SELinux denials

Expected results:

No denials

Comment 1 Joel Uckelman 2013-05-06 15:17:48 UTC
Additionally:

SELinux is preventing /usr/sbin/collectd from node_bind access on the udp_socket .

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

If you believe that collectd should be allowed node_bind access on the  udp_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:object_r:node_t:s0
Target Objects                 [ udp_socket ]
Source                        collectd
Source Path                   /usr/sbin/collectd
Port                          25826
Host                          hydra.ellipsis.cx
Source RPM Packages           collectd-5.2.0-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-92.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     hydra.ellipsis.cx
Platform                      Linux hydra.ellipsis.cx 3.8.11-200.fc18.x86_64 #1
                              SMP Wed May 1 19:44:27 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-05-06 17:17:03 CEST
Last Seen                     2013-05-06 17:17:03 CEST
Local ID                      d56d520b-a5b9-421a-967f-0c8b1fed1394

Raw Audit Messages
type=AVC msg=audit(1367853423.469:8166): avc:  denied  { node_bind } for  pid=4179 comm="collectd" saddr=68.14.242.203 src=25826 scontext=system_u:system_r:collectd_t:s0 tcontext=system_u:object_r:node_t:s0 tclass=udp_socket


type=SYSCALL msg=audit(1367853423.469:8166): arch=x86_64 syscall=bind success=no exit=EACCES a0=4 a1=2198ad0 a2=10 a3=7fffd44f8024 items=0 ppid=1 pid=4179 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,node_t,udp_socket,node_bind

audit2allow

#============= collectd_t ==============
allow collectd_t node_t:udp_socket node_bind;

audit2allow -R
require {
        type collectd_t;
}

#============= collectd_t ==============
corenet_udp_bind_generic_node(collectd_t)

Comment 2 Daniel Walsh 2013-05-07 20:53:00 UTC
ba2b06db32a11d19f4818f7f92237ca88a273fa1
efb16baba33e26ecdce3bfd51cdbef421cada5a8

Fixes this in git.

Comment 3 Lukas Vrabec 2013-10-22 12:45:11 UTC
back ported to f18 branch.

Comment 4 Fedora Update System 2013-12-19 23:59:51 UTC
selinux-policy-3.11.1-108.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-108.fc18

Comment 5 Fedora Update System 2013-12-21 02:18:17 UTC
Package selinux-policy-3.11.1-108.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-108.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23716/selinux-policy-3.11.1-108.fc18
then log in and leave karma (feedback).

Comment 6 Fedora End Of Life 2013-12-21 15:46:39 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora Update System 2014-01-05 06:08:01 UTC
selinux-policy-3.11.1-108.fc18 has been pushed to the Fedora 18 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.