RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1427415 - Latest Nagios 4.2.4 broken under SELinux
Summary: Latest Nagios 4.2.4 broken under SELinux
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-28 07:08 UTC by alex
Modified: 2018-04-10 12:29 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.13.1-175.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 12:28:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0763 0 None None None 2018-04-10 12:29:13 UTC

Description alex 2017-02-28 07:08:44 UTC
Description of problem:

After upgrading to the latest Nagios package available, 4.2.4, the web frontend no longer works with SELinux enabled. I get the following on audit.log

type=AVC msg=audit(1488265620.009:2548): avc:  denied  { read } for  pid=27346 comm="tac.cgi" name="objects.cache" dev="vda3" ino=33626409 scontext=system_u:system_r:nagios_script_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file
type=SYSCALL msg=audit(1488265620.009:2548): arch=c000003e syscall=2 success=no exit=-13 a0=7f2237600430 a1=0 a2=7f2237600210 a3=4 items=0 ppid=26820 pid=27346 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="tac.cgi" exe="/usr/lib64/nagios/cgi-bin/tac.cgi" subj=system_u:system_r:nagios_script_t:s0 key=(null)

This might be due to some paths in nagios.cfg changing from /var/log/nagios to /var/spool/nagios, I think.


Steps to Reproduce:

1. Run nagios with SELinux enabled
2. Go to the UI

Actual results:

UI doesn't work

Expected results:

UI works

Comment 2 Milos Malik 2017-02-28 09:42:45 UTC
Following SELinux denial appeared after "service nagios start":
----
type=SYSCALL msg=audit(02/28/2017 04:28:41.347:296) : arch=x86_64 syscall=connect success=no exit=EACCES(Permission denied) a0=0x3 a1=0x7ffdbb915f70 a2=0x21 a3=0xfffffe00 items=0 ppid=1415 pid=1417 auid=unset uid=nagios gid=nagios euid=nagios suid=nagios fsuid=nagios egid=nagios sgid=nagios fsgid=nagios tty=(none) ses=unset comm=nagios exe=/usr/sbin/nagios subj=system_u:system_r:nagios_t:s0 key=(null) 
type=AVC msg=audit(02/28/2017 04:28:41.347:296) : avc:  denied  { connectto } for  pid=1417 comm=nagios path=/var/spool/nagios/cmd/nagios.qh scontext=system_u:system_r:nagios_t:s0 tcontext=system_u:system_r:nagios_t:s0 tclass=unix_stream_socket 
----

Following SELinux denials appeared when I was clicking in the web UI:
----
type=SYSCALL msg=audit(02/28/2017 04:40:37.316:330) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7fee9730c3d0 a1=O_RDONLY a2=0x7fee9730c0a0 a3=0x4 items=0 ppid=1709 pid=1755 auid=unset uid=apache gid=apache euid=apache suid=apache fsuid=apache egid=apache sgid=apache fsgid=apache tty=(none) ses=unset comm=outages.cgi exe=/usr/lib64/nagios/cgi-bin/outages.cgi subj=system_u:system_r:nagios_script_t:s0 key=(null) 
type=AVC msg=audit(02/28/2017 04:40:37.316:330) : avc:  denied  { read } for  pid=1755 comm=outages.cgi name=objects.cache dev="dm-1" ino=258425 scontext=system_u:system_r:nagios_script_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file 
----
type=SYSCALL msg=audit(02/28/2017 04:40:36.031:329) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f9997ec0370 a1=O_RDONLY a2=0x7f9997ec0830 a3=0x4 items=0 ppid=1709 pid=1754 auid=unset uid=apache gid=apache euid=apache suid=apache fsuid=apache egid=apache sgid=apache fsgid=apache tty=(none) ses=unset comm=status.cgi exe=/usr/lib64/nagios/cgi-bin/status.cgi subj=system_u:system_r:nagios_script_t:s0 key=(null) 
type=AVC msg=audit(02/28/2017 04:40:36.031:329) : avc:  denied  { read } for  pid=1754 comm=status.cgi name=objects.cache dev="dm-1" ino=258425 scontext=system_u:system_r:nagios_script_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file 
----

Comment 3 Milos Malik 2017-02-28 09:46:23 UTC
Following AVCs appeared in permissive mode:
----
type=SYSCALL msg=audit(02/28/2017 04:43:03.409:335) : arch=x86_64 syscall=fstat success=yes exit=0 a0=0x3 a1=0x7ffe47a0efc0 a2=0x7ffe47a0efc0 a3=0x4 items=0 ppid=1742 pid=1767 auid=unset uid=apache gid=apache euid=apache suid=apache fsuid=apache egid=apache sgid=apache fsgid=apache tty=(none) ses=unset comm=tac.cgi exe=/usr/lib64/nagios/cgi-bin/tac.cgi subj=system_u:system_r:nagios_script_t:s0 key=(null) 
type=AVC msg=audit(02/28/2017 04:43:03.409:335) : avc:  denied  { getattr } for  pid=1767 comm=tac.cgi path=/var/spool/nagios/objects.cache dev="dm-1" ino=258425 scontext=system_u:system_r:nagios_script_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file 
----
type=SYSCALL msg=audit(02/28/2017 04:43:03.409:334) : arch=x86_64 syscall=open success=yes exit=3 a0=0x7fd148dbf3d0 a1=O_RDONLY a2=0x7fd148dbf0a0 a3=0x4 items=0 ppid=1742 pid=1767 auid=unset uid=apache gid=apache euid=apache suid=apache fsuid=apache egid=apache sgid=apache fsgid=apache tty=(none) ses=unset comm=tac.cgi exe=/usr/lib64/nagios/cgi-bin/tac.cgi subj=system_u:system_r:nagios_script_t:s0 key=(null) 
type=AVC msg=audit(02/28/2017 04:43:03.409:334) : avc:  denied  { open } for  pid=1767 comm=tac.cgi path=/var/spool/nagios/objects.cache dev="dm-1" ino=258425 scontext=system_u:system_r:nagios_script_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file 
type=AVC msg=audit(02/28/2017 04:43:03.409:334) : avc:  denied  { read } for  pid=1767 comm=tac.cgi name=objects.cache dev="dm-1" ino=258425 scontext=system_u:system_r:nagios_script_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file 
----

Comment 9 errata-xmlrpc 2018-04-10 12:28:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0763


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