Bug 1004348

Summary: SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory /var/lib/clamav.
Product: [Fedora] Fedora Reporter: John Griffiths <fedora.jrg01>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, fedora.jrg01, jkaluza, jorton, lvrabec, mgrepl, pahan
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:956fb2499bbdfbbc3ba8d7fc9901836c9fc8279144016ec23c82643490f2d398
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-29 17:16:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description John Griffiths 2013-09-04 13:03:57 UTC
Description of problem:
SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory /var/lib/clamav.

Do not know if this should be allowed or not.

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

If you believe that httpd should be allowed search access on the clamav directory 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 /usr/sbin/httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:antivirus_db_t:s0
Target Objects                /var/lib/clamav [ dir ]
Source                        /usr/sbin/httpd
Source Path                   /usr/sbin/httpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           httpd-2.4.6-2.fc19.x86_64
Target RPM Packages           clamav-filesystem-0.97.8-2.fc19.noarch
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.9-200.fc19.x86_64 #1 SMP Wed
                              Aug 21 19:27:58 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-09-01 03:19:05 EDT
Last Seen                     2013-09-01 03:19:05 EDT
Local ID                      bfc3fd82-446e-4117-b471-9260e7124094

Raw Audit Messages
type=AVC msg=audit(1378019945.558:9800): avc:  denied  { search } for  pid=8317 comm="/usr/sbin/httpd" name="clamav" dev="dm-1" ino=6426830 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:antivirus_db_t:s0 tclass=dir


type=SYSCALL msg=audit(1378019945.558:9800): arch=x86_64 syscall=stat success=no exit=EACCES a0=7f621bcb6680 a1=7fff913c40b0 a2=7fff913c40b0 a3=fffffe00 items=0 ppid=1407 pid=8317 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 ses=4294967295 tty=(none) comm=/usr/sbin/httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: /usr/sbin/httpd,httpd_t,antivirus_db_t,dir,search

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.10-200.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-09-04 13:07:20 UTC
Is this a standard package?  Should we have a special domain to look at antivirus content from a cgi script?

Comment 2 John Griffiths 2013-09-04 13:21:50 UTC
Standard package clamav-filesystem-0.97.8-2.fc19.noarch

Comment 3 Daniel Walsh 2013-09-04 13:25:30 UTC
That has nothing in there about apache.

Comment 4 John Griffiths 2013-09-04 13:32:17 UTC
Don't know. I only configured httpd.conf to add my virtual domains.

Comment 5 Miroslav Grepl 2013-09-09 17:54:48 UTC
So there is no a special apache module? Do you know what you were doing when this happened. It would be nice to trace/catch it.

Comment 6 John Griffiths 2013-09-09 18:14:54 UTC
This happens each time Apache is restarted.

Comment 7 Joe Orton 2014-01-29 17:16:59 UTC
As per bug 1004350, I would say it is time to audit this machine!