Bug 640642

Summary: SELinux is preventing /usr/sbin/certmonger "search" access on /etc/httpd.
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: medium Docs Contact:
Priority: urgent    
Version: 6.1CC: antillon.maurizio, dwalsh, ksrot, mgrepl, mmalik, snagar
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:cf821bd505f809f3e4d5f46044f519e6f965ebb10b406b160e7d351636d194b8
Fixed In Version: selinux-policy-3.7.19-57.el6 Doc Type: Bug Fix
Doc Text:
Due to SELinux policies, certmonger was not permitted to search through directories that contain certificates. This error has been fixed, and selinux-policy packages now contain updated SELinux rules, which allow certmonger to access these directories.
Story Points: ---
Clone Of: 640641 Environment:
Last Closed: 2011-05-19 11:56:47 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:
Bug Depends On: 640641    
Bug Blocks: 642607    

Description Dmitri Pal 2010-10-06 14:33:54 UTC
+++ This bug was initially created as a clone of Bug #640641 +++


Summary:

SELinux is preventing /usr/sbin/certmonger "search" access on /etc/httpd.

Detailed Description:

SELinux denied access requested by certmonger. It is not expected that this
access is required by certmonger 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:certmonger_t:s0
Target Context                system_u:object_r:httpd_config_t:s0
Target Objects                /etc/httpd [ dir ]
Source                        certmonger
Source Path                   /usr/sbin/certmonger
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           certmonger-0.30-1.fc13
Target RPM Packages           httpd-2.2.16-1.fc13
Policy RPM                    selinux-policy-3.7.19-62.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.3-85.fc13.i686 #1 SMP Thu
                              May 6 18:44:12 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Wed 06 Oct 2010 10:11:28 AM EDT
Last Seen                     Wed 06 Oct 2010 10:11:28 AM EDT
Local ID                      fbe332ab-faf6-4cc0-8da8-4cdf93159c56
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1286374288.353:192): avc:  denied  { search } for  pid=8719 comm="certmonger" name="httpd" dev=dm-0 ino=38372 scontext=unconfined_u:system_r:certmonger_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1286374288.353:192): arch=40000003 syscall=195 success=no exit=-13 a0=9e28118 a1=bfd4f48c a2=840ff4 a3=3 items=0 ppid=1 pid=8719 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="certmonger" exe="/usr/sbin/certmonger" subj=unconfined_u:system_r:certmonger_t:s0 key=(null)



Hash String generated from  catchall,certmonger,certmonger_t,httpd_config_t,dir,search
audit2allow suggests:

#============= certmonger_t ==============
allow certmonger_t httpd_config_t:dir search;

Comment 1 Daniel Walsh 2010-10-06 15:08:51 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=640641

Dup these changes into RHEL6 please.

Comment 3 Miroslav Grepl 2010-10-13 06:09:17 UTC
Fixed in selinux-policy-3.7.19-57.el6.

Comment 7 Jaromir Hradilek 2010-10-14 12:19:46 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Due to SELinux policies, certmonger was not permitted to search through directories that contain certificates. This error has been fixed, and selinux-policy packages now contain updated SELinux rules, which allow certmonger to access these directories.

Comment 10 errata-xmlrpc 2011-05-19 11:56:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0526.html