Bug 462896 - SELINUX prevents nagios to PING
SELINUX prevents nagios to PING
Status: CLOSED DUPLICATE of bug 591832
Product: Fedora
Classification: Fedora
Component: nagios (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike McGrath
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-19 11:07 EDT by Jan Huijbers
Modified: 2010-09-11 14:25 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-14 10:30:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Huijbers 2008-09-19 11:07:53 EDT
Description of problem:
Selinux prevents nagios to ping

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

How reproducible:
everytime

Steps to Reproduce:
1. run nagios to ping a host
2.
3.
  
Actual results:


Expected results:


Additional info:
Sep 19 16:56:08 fedora-pc setroubleshoot: SELinux is preventing ping (ping_t) "read" to /var/spool/nagios/cmd/nagios.cmd (nagios_spool_t). For complete SELinux messages. run sealert -l f91f93bd-0dd7-44f2-9199-149223c78b0b

[root@fedora-pc ~]# sealert -l f91f93bd-0dd7-44f2-9199-149223c78b0b

Summary:

SELinux is preventing ping (ping_t) "read" to /var/spool/nagios/cmd/nagios.cmd
(nagios_spool_t).

Detailed Description:

[SELinux is in permissive mode, the operation would have been denied but was
permitted due to permissive mode.]

SELinux denied access requested by ping. It is not expected that this access is
required by ping and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context                system_u:system_r:ping_t
Target Context                unconfined_u:object_r:nagios_spool_t
Target Objects                /var/spool/nagios/cmd/nagios.cmd [ fifo_file ]
Source                        ping
Source Path                   /bin/ping
Port                          <Unknown>
Host                          fedora-pc.huijbers.net
Source RPM Packages           iputils-20070202-5.fc8
Target RPM Packages
Policy RPM                    selinux-policy-3.0.8-115.fc8
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     fedora-pc.huijbers.net
Platform                      Linux fedora-pc.huijbers.net 2.6.26.3-14.fc8 #1
                              SMP Wed Sep 3 03:40:05 EDT 2008 i686 i686
Alert Count                   770
First Seen                    Fri Aug 15 09:25:53 2008
Last Seen                     Fri Sep 19 17:05:08 2008
Local ID                      f91f93bd-0dd7-44f2-9199-149223c78b0b
Line Numbers

Raw Audit Messages

host=fedora-pc.huijbers.net type=AVC msg=audit(1221836708.230:8276): avc:  denied  { read } for  pid=32412 comm="ping" path="/var/spool/nagios/cmd/nagios.cmd" dev=dm-0 ino=6456086 scontext=system_u:system_r:ping_t:s0 tcontext=unconfined_u:object_r:nagios_spool_t:s0 tclass=fifo_file

host=fedora-pc.huijbers.net type=SYSCALL msg=audit(1221836708.230:8276): arch=40000003 syscall=11 success=yes exit=0 a0=922aa48 a1=922aae0 a2=bff5e374 a3=922aae0 items=0 ppid=32411 pid=32412 auid=4294967295 uid=493 gid=488 euid=0 suid=0 fsuid=0 egid=488 sgid=488 fsgid=488 tty=(none) ses=4294967295 comm="ping" exe="/bin/ping" subj=system_u:system_r:ping_t:s0 key=(null)
Comment 1 Daniel Walsh 2008-09-22 14:02:08 EDT
This says the ping command is reading /var/spool/nagios/cmd/nagios.cmd, which seems highly unlikely.  Looks like a leaked file descriptor.

nagios should close all open file descriptors before execing apps.

fcntl(fd, F_SETFD, FD_CLOEXEC)
Comment 2 mail@romal.de 2008-10-20 04:28:57 EDT
Asked upstream about this problem.
Comment 3 mail@romal.de 2008-10-21 04:00:27 EDT
Which nagios / nagios-plugins packages are you using ? Does this error still happen ?
Comment 4 Jan Huijbers 2008-10-21 13:43:38 EDT
It is still happening:

Oct 21 19:40:09 fedora-pc setroubleshoot: SELinux is preventing ping (ping_t) "read" to /var/spool/nagios/cmd/nagios.cmd (nagios_spool_t). For complete SELinux messages. run sealert -l 16694f13-1bb8-4c89-b580-a58e508a4d8a

[root@fedora-pc ~]# sealert -l 16694f13-1bb8-4c89-b580-a58e508a4d8a

Summary:

SELinux is preventing ping (ping_t) "read" to /var/spool/nagios/cmd/nagios.cmd
(nagios_spool_t).

Detailed Description:

[SELinux is in permissive mode, the operation would have been denied but was
permitted due to permissive mode.]

SELinux denied access requested by ping. It is not expected that this access is
required by ping and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context                unconfined_u:system_r:ping_t
Target Context                unconfined_u:object_r:nagios_spool_t
Target Objects                /var/spool/nagios/cmd/nagios.cmd [ fifo_file ]
Source                        ping
Source Path                   /bin/ping
Port                          <Unknown>
Host                          fedora-pc.huijbers.net
Source RPM Packages           iputils-20071127-2.fc9
Target RPM Packages
Policy RPM                    selinux-policy-3.3.1-99.fc9
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     fedora-pc.huijbers.net
Platform                      Linux fedora-pc.huijbers.net 2.6.26.5-45.fc9.i686
                              #1 SMP Sat Sep 20 03:45:00 EDT 2008 i686 i686
Alert Count                   3891
First Seen                    Wed Aug 13 20:13:07 2008
Last Seen                     Tue Oct 21 19:40:09 2008
Local ID                      16694f13-1bb8-4c89-b580-a58e508a4d8a
Line Numbers

Raw Audit Messages

host=fedora-pc.huijbers.net type=AVC msg=audit(1224610809.255:18668): avc:  denied  { read } for  pid=22076 comm="ping" path="/var/spool/nagios/cmd/nagios.cmd" dev=dm-0 ino=6456086 scontext=unconfined_u:system_r:ping_t:s0 tcontext=unconfined_u:object_r:nagios_spool_t:s0 tclass=fifo_file

host=fedora-pc.huijbers.net type=SYSCALL msg=audit(1224610809.255:18668): arch=40000003 syscall=11 success=yes exit=0 a0=81289a0 a1=8128ae8 a2=bfce8294 a3=0 items=0 ppid=22075 pid=22076 auid=500 uid=493 gid=488 euid=0 suid=0 fsuid=0 egid=488 sgid=488 fsgid=488 tty=(none) ses=2269 comm="ping" exe="/bin/ping" subj=unconfined_u:system_r:ping_t:s0 key=(null)



I'm using these packages:

[root@fedora-pc ~]# rpm -qa | grep nagios
nagios-plugins-mrtgtraf-1.4.13-5.fc9.i386
nagios-plugins-dig-1.4.13-5.fc9.i386
nagios-plugins-nrpe-2.7-6.fc9.i386
nagios-plugins-mrtg-1.4.13-5.fc9.i386
nagios-plugins-radius-1.4.13-5.fc9.i386
nagios-plugins-by_ssh-1.4.13-5.fc9.i386
nagios-plugins-overcr-1.4.13-5.fc9.i386
nagios-plugins-dummy-1.4.13-5.fc9.i386
nagios-plugins-perl-1.4.13-5.fc9.i386
nagios-plugins-disk-1.4.13-5.fc9.i386
nagios-plugins-http-1.4.13-5.fc9.i386
nagios-plugins-mailq-1.4.13-5.fc9.i386
nagios-plugins-ifstatus-1.4.13-5.fc9.i386
nagios-plugins-1.4.13-5.fc9.i386
nagios-plugins-swap-1.4.13-5.fc9.i386
nagios-plugins-users-1.4.13-5.fc9.i386
nagios-plugins-time-1.4.13-5.fc9.i386
nagios-plugins-wave-1.4.13-5.fc9.i386
nagios-plugins-ssh-1.4.13-5.fc9.i386
nagios-plugins-dhcp-1.4.13-5.fc9.i386
nagios-plugins-nwstat-1.4.13-5.fc9.i386
nagios-plugins-dns-1.4.13-5.fc9.i386
nagios-plugins-mysql-1.4.13-5.fc9.i386
nagios-plugins-ldap-1.4.13-5.fc9.i386
nagios-plugins-smtp-1.4.13-5.fc9.i386
nagios-plugins-ircd-1.4.13-5.fc9.i386
nagios-plugins-procs-1.4.13-5.fc9.i386
nagios-plugins-fping-1.4.13-5.fc9.i386
nagios-plugins-ide_smart-1.4.13-5.fc9.i386
nagios-plugins-oracle-1.4.13-5.fc9.i386
nagios-plugins-ntp-1.4.13-5.fc9.i386
nagios-plugins-tcp-1.4.13-5.fc9.i386
nagios-2.11-3.fc9.i386
nagios-plugins-rpc-1.4.13-5.fc9.i386
nagios-plugins-sensors-1.4.13-5.fc9.i386
nagios-plugins-ifoperstatus-1.4.13-5.fc9.i386
nagios-plugins-hpjd-1.4.13-5.fc9.i386
nagios-plugins-icmp-1.4.13-5.fc9.i386
nagios-plugins-ups-1.4.13-5.fc9.i386
nagios-plugins-pgsql-1.4.13-5.fc9.i386
nagios-plugins-snmp-1.4.13-5.fc9.i386
nagios-plugins-disk_smb-1.4.13-5.fc9.i386
nagios-plugins-all-1.4.13-5.fc9.i386
nagios-plugins-ping-1.4.13-5.fc9.i386
nagios-plugins-cluster-1.4.13-5.fc9.i386
nagios-plugins-game-1.4.13-5.fc9.i386
nagios-plugins-flexlm-1.4.13-5.fc9.i386
nagios-plugins-nt-1.4.13-5.fc9.i386
nagios-plugins-real-1.4.13-5.fc9.i386
nagios-plugins-file_age-1.4.13-5.fc9.i386
nagios-plugins-nagios-1.4.13-5.fc9.i386
nagios-plugins-breeze-1.4.13-5.fc9.i386
nagios-plugins-load-1.4.13-5.fc9.i386
nagios-plugins-udp-1.4.13-5.fc9.i386
nagios-plugins-log-1.4.13-5.fc9.i386
Comment 5 Bug Zapper 2009-06-09 22:45:50 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  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 '9'.

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 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Mike McGrath 2009-06-22 15:31:15 EDT
I'm actually not able to reproduce this on a fresh F-11 install.  Exactly what command are you running?
Comment 7 Bug Zapper 2009-07-14 10:30:23 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 8 Peter Lemenkov 2010-09-11 14:25:35 EDT

*** This bug has been marked as a duplicate of bug 591832 ***

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