Bug 595528

Summary: SELinux is preventing /usr/sbin/clamd "create" access on clamd.sock.
Product: [Fedora] Fedora Reporter: Adam Royal <adam.w.royal>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dwalsh, mgrepl, mishu
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:c5e0bbd5fa91722b63f129e5248173d541dcf66e6d9aa34f5b61d914c6bca232
Fixed In Version: selinux-policy-3.7.19-23.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-08 19:28:10 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 Adam Royal 2010-05-24 21:42:30 UTC
Summary:

SELinux is preventing /usr/sbin/clamd "create" access on clamd.sock.

Detailed Description:

SELinux denied access requested by clamd. It is not expected that this access is
required by clamd 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:clamd_t:s0
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                clamd.sock [ sock_file ]
Source                        clamd
Source Path                   /usr/sbin/clamd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           clamav-server-0.95.3-1301.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-15.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.4-95.fc13.x86_64 #1 SMP
                              Thu May 13 05:16:23 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Mon 24 May 2010 05:41:32 PM EDT
Last Seen                     Mon 24 May 2010 05:41:32 PM EDT
Local ID                      4c0a30d7-9ae2-4f33-b8e1-60c5a79f3beb
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1274737292.323:525): avc:  denied  { create } for  pid=24508 comm="clamd" name="clamd.sock" scontext=unconfined_u:system_r:clamd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=sock_file

node=(removed) type=SYSCALL msg=audit(1274737292.323:525): arch=c000003e syscall=49 success=no exit=-13 a0=4 a1=7fffdafca6c0 a2=6e a3=7fffdafca3b0 items=0 ppid=24505 pid=24508 auid=500 uid=486 gid=470 euid=486 suid=486 fsuid=486 egid=470 sgid=470 fsgid=470 tty=(none) ses=1 comm="clamd" exe="/usr/sbin/clamd" subj=unconfined_u:system_r:clamd_t:s0 key=(null)



Hash String generated from  catchall,clamd,clamd_t,var_run_t,sock_file,create
audit2allow suggests:

#============= clamd_t ==============
allow clamd_t var_run_t:sock_file create;

Comment 1 Daniel Walsh 2010-05-25 15:19:13 UTC
This could be a labeling issue.

Could you execute 

restorecon -R -v /var/run 

And see if this fixes the problem.

Comment 2 Adam Royal 2010-05-25 20:04:13 UTC
That did not fix the problem. The same message was reported.

Comment 3 Daniel Walsh 2010-05-27 18:59:13 UTC
You can add these rules for now using

# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fixed in selinux-policy-3.7.19-22.fc13.noarch

Or you can move the socket into /var/run/clamav

Comment 4 Fedora Update System 2010-05-28 12:27:57 UTC
selinux-policy-3.7.19-22.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-22.fc13

Comment 5 Fedora Update System 2010-05-31 18:20:00 UTC
selinux-policy-3.7.19-22.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-22.fc13

Comment 6 Fedora Update System 2010-06-02 18:12:05 UTC
selinux-policy-3.7.19-23.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-23.fc13

Comment 7 Fedora Update System 2010-06-08 19:26:29 UTC
selinux-policy-3.7.19-23.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.