Bug 599297

Summary: SELinux is preventing /bin/bash "search" access on /etc/httpd.
Product: [Fedora] Fedora Reporter: Lev Shamardin <shamardin>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 12CC: dwalsh, mgrepl, shamardin
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:c36cebad63b3e637ea3e45227e9694a30f5b7859868309a4571f61080cd35db1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-03 13:45:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lev Shamardin 2010-06-03 04:20:37 UTC
Summary:

SELinux is preventing /bin/bash "search" access on /etc/httpd.

Detailed Description:

Note from bug reporter: This appeared right after installing and starting nagios on Fedora with its default configuration.

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by sh. It is not expected that this access is
required by sh 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://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                unconfined_u:system_r:nagios_t:s0
Target Context                system_u:object_r:httpd_config_t:s0
Target Objects                /etc/httpd [ dir ]
Source                        sh
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.0.35-3.fc12
Target RPM Packages           httpd-2.2.15-1.fc12.2
Policy RPM                    selinux-policy-3.6.32-114.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.32.12-115.fc12.i686.PAE #1 SMP Fri Apr 30
                              20:14:08 UTC 2010 i686 i686
Alert Count                   4
First Seen                    Thu 03 Jun 2010 08:18:30 AM MSD
Last Seen                     Thu 03 Jun 2010 08:19:06 AM MSD
Local ID                      efad5bb7-8be0-46dc-ba0d-abbcc449e20f
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1275538746.32:1249): avc:  denied  { search } for  pid=30732 comm="sh" name="httpd" dev=dm-0 ino=48700 scontext=unconfined_u:system_r:nagios_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1275538746.32:1249): avc:  denied  { getattr } for  pid=30732 comm="sh" path="/etc/httpd/conf.d" dev=dm-0 ino=48701 scontext=unconfined_u:system_r:nagios_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1275538746.32:1249): arch=40000003 syscall=195 success=yes exit=0 a0=94e8e68 a1=bf86ed70 a2=f28ff4 a3=0 items=0 ppid=30731 pid=30732 auid=500 uid=481 gid=465 euid=481 suid=481 fsuid=481 egid=465 sgid=465 fsgid=465 tty=(none) ses=1 comm="sh" exe="/bin/bash" subj=unconfined_u:system_r:nagios_t:s0 key=(null)



Hash String generated from  catchall,sh,nagios_t,httpd_config_t,dir,search
audit2allow suggests:

#============= nagios_t ==============
allow nagios_t httpd_config_t:dir { search getattr };

Comment 1 Miroslav Grepl 2010-06-03 09:10:27 UTC
What is your version of nagios? Looks like nagios is looking for nagios.conf in /etc/httpd/conf.d.

Comment 2 Lev Shamardin 2010-06-03 10:02:44 UTC
$ rpm -q nagios
nagios-3.2.1-2.fc12.i686

Comment 3 Miroslav Grepl 2010-06-23 08:07:09 UTC
Fixed in selinux-policy-3.6.32-119.fc12

Comment 4 Bug Zapper 2010-11-03 13:40:27 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  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 '12'.

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 12'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 12 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