Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 452787 - squid ceased to work after upgrade to 5.2
Summary: squid ceased to work after upgrade to 5.2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted
Version: 5.2
Hardware: i386
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-25 05:37 UTC by Tomasz Kepczynski
Modified: 2012-10-16 08:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:32:05 UTC


Attachments (Terms of Use)
Te file to fix squid (deleted)
2008-06-25 11:56 UTC, Daniel Walsh
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0163 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2009-01-20 16:05:21 UTC

Description Tomasz Kepczynski 2008-06-25 05:37:16 UTC
Description of problem:
My squid ceased to work after yesterday I updated to 5.2.
Search in audit.log yields:

time->Wed Jun 25 07:25:18 2008
type=ANOM_ABEND msg=audit(1214371518.634:1480): auid=0 uid=23 gid=23 ses=227
subj=root:system_r:squid_t:s0 pid=13115 comm="squid" sig=6

and in /var/log/messages I have:

Jun 25 07:25:18 triss (squid): Cannot open snmp Port
Jun 25 07:25:18 triss squid[13081]: Squid Parent: child process 13115 exited due
 to signal 6
Jun 25 07:25:18 triss squid[13081]: Exiting due to repeated, frequent failures
Jun 25 07:25:34 triss squid[13147]: Squid Parent: child process 13149 started

Squid simply does not start. After I set selinux mode
to permissive I am able to start squid so I guess
this is selinux problem.

Thing to note: I have snmp enabled in squid and snmp port
is use is 3401 (the default AFAIR). Disabling snmp also
helps. Setting squid_connect_any to 1 does not help.


Version-Release number of selected component (if applicable):
squid-2.6.STABLE6-5.el5_1.3
selinux-policy-targeted-2.4.6-137.el5


How reproducible:
always

Actual results:
squid does not start with snmp enabled and selinux enforcing

Expected results:
squid starts uder these conditions

Additional info:
I found this on CentOS, not RHEL, but I believe you might be interested.

Comment 1 Daniel Walsh 2008-06-25 11:40:52 UTC
You can turn off the DONTAUDIT rules by executing 

# semodule -b /usr/share/selinux/targeted/enableaudit.pp

Do you see any AVC messages, when starting squid?

Turn them back on by executing

# semodule -b /usr/share/selinux/targeted/base.pp

Comment 2 Daniel Walsh 2008-06-25 11:55:11 UTC
I just reviewed the difference between Rawhide Squid policy and RHEL5 and it
looks like listening on 3401 was added after the fact,  So this is indeed a bug.

You can create a custom policy module to allow it to bind to this service



Comment 3 Daniel Walsh 2008-06-25 11:56:37 UTC
Created attachment 310254 [details]
Te file to fix squid

Extract attachment into mysquid.te

# make -f /usr/share/selinux/devel/Makefile
# semodule -i mysquid.pp

Should fix

Comment 4 Daniel Walsh 2008-06-25 11:59:48 UTC
Fixed in selinux-policy-2.4.6-140.el5 

Comment 5 RHEL Product and Program Management 2008-06-25 12:13:13 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 10 errata-xmlrpc 2009-01-20 21:32:05 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-2009-0163.html


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