Created attachment 597483 [details] Syslog messages Description of problem: SELinux policy does not allow freeshclam to update databases through HTTP proxy when run by cron. When it is run manual by an unconfined user, everything is all right. HTTP proxy is set via profile.d shell script. Version-Release number of selected component (if applicable): selinux-policy-targeted-3.10.0-137.fc17.noarch clamav-update-0.97.5-1700.fc17.i686 How reproducible: Install clamav-update, turn on selinux targeted mode, set up proxy and cron clamav updates. Wait for syslog and selinux messages. Steps to Reproduce: 1. Install clamav-update. 2. Turn on selinux targeted mode. 3. Set up proxy. 4. Set up cron clamav updates. Actual results: ClamAV databases update fails Expected results: ClamAV databases update completes Additional info:
Created attachment 597484 [details] Sealert message
Created attachment 597485 [details] Freshclam configuration
Created attachment 597486 [details] SELinux module that allows freshclam proxy connection
I'm sorry, the version of components are from another computer with Fedora 17. The actual versions are: selinux-policy-targeted-3.10.0-89.fc16.noarch clamav-update-0.97.3-1600.fc16.i686
Fixed.
Hello there, I have the very same problem with clamav-0.97.5-1.el6.x86_64 in RHEL 6.3 but in my case I setted the proxy parameters in /etc/freshclam.conf using the HTTPProxy* directives. I got the following entries in audit.log: type=AVC msg=audit(1349251647.435:43404): avc: denied { name_connect } for pid=6865 comm="freshclam" dest=8080 scontext=system_u:system_r:freshclam_t:s0-s0:c0.c1023 tcontext=system_u:object_r:http_cache_port_t:s0 tclass=tcp_socket type=SYSCALL msg=audit(1349251647.435:43404): arch=c000003e syscall=42 success=no exit=-13 a0=5 a1=17253f0 a2=10 a3=0 items=0 ppid=6863 pid=6865 auid=0 uid=496 gid=492 euid=496 suid=496 fsuid=496 egid=492 sgid=492 fsgid=492 tty=(none) ses=2999 comm="freshclam" exe="/usr/bin/freshclam" subj=system_u:system_r:freshclam_t:s0-s0:c0.c1023 key=(null) And using the audit2allow tool it generated the following policy: module freshclam-mypol 1.0; require { type freshclam_t; type http_cache_port_t; class tcp_socket name_connect; } #============= freshclam_t ============== allow freshclam_t http_cache_port_t:tcp_socket name_connect; I still have to wait until tomorrow to confirm if this actually solves the problem. The affected packages are: selinux-policy-3.7.19-154.el6.noarch selinux-policy-targeted-3.7.19-154.el6.noarch libselinux-2.0.94-5.3.el6.x86_64 I really hope this gets fixed in RHEL. Thanks.
I now confirm that this changes worked perfectly, I can see successful updates for Oct 4 and 5.
selinux-policy-3.10.0-96.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-96.fc16
Package selinux-policy-3.10.0-96.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-96.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-18243/selinux-policy-3.10.0-96.fc16 then log in and leave karma (feedback).
selinux-policy-3.10.0-96.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.