RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 863407 - SELinux policy doesn't allow freshclam to update through http proxy
Summary: SELinux policy doesn't allow freshclam to update through http proxy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Michal Trunecka
URL:
Whiteboard:
Depends On: 839191
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-05 12:08 UTC by Miroslav Grepl
Modified: 2014-09-30 23:33 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.7.19-168.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 839191
Environment:
Last Closed: 2013-02-21 08:31:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0314 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-02-20 20:35:01 UTC

Description Miroslav Grepl 2012-10-05 12:08:55 UTC
+++ This bug was initially created as a clone of Bug #839191 +++

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:

--- Additional comment from metanoite on 2012-07-11 03:47:42 EDT ---

Created attachment 597484 [details]
Sealert message

--- Additional comment from metanoite on 2012-07-11 03:48:32 EDT ---

Created attachment 597485 [details]
Freshclam configuration

--- Additional comment from metanoite on 2012-07-11 03:50:25 EDT ---

Created attachment 597486 [details]
SELinux module that allows freshclam proxy connection

--- Additional comment from metanoite on 2012-07-11 03:57:40 EDT ---

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

--- Additional comment from mgrepl on 2012-07-11 08:38:48 EDT ---

Fixed.

--- Additional comment from williama_lovaton.co on 2012-10-03 10:53:15 EDT ---

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.

Comment 4 errata-xmlrpc 2013-02-21 08:31:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0314.html


Note You need to log in before you can comment on or make changes to this bug.