Bug 159905 - Squid cachemgr.cgi exec denied by Selinux
Squid cachemgr.cgi exec denied by Selinux
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: selinux-policy-strict (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-08 18:40 EDT by Derek Carter
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-03 17:29:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Derek Carter 2005-06-08 18:40:42 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050416 Fedora/1.0.3-1.3.1 Firefox/1.0.3

Description of problem:
Targeted SELinux policy denies execute on /usr/lib/squid/cachemgr.cgi when run as a cgi script from that directory

cachemgr is labeled as follows:

system_u:object_r:lib_t

by re-labeling to:

system_u:object_r:httpd_exec_t

Apache can execute the script with no problems


Version-Release number of selected component (if applicable):
selinux-policy-targeted-1.17.30-2.96 squid-2.5.STABLE6-3

How reproducible:
Always

Steps to Reproduce:
1. Enable /usr/lib/squid as a scriptalias
2. visit cachemgr.cgi from a web browser
3. check logs in /var/log/messages and /var/log/httpd/error_log
  

Actual Results:  /var/log/messages:
Jun  8 16:13:23 server1 kernel: audit(1118268803.919:0): avc:  denied  { execute } for  pid=12595 exe=/usr/sbin/httpd name=cachemgr.cgi dev=hda3 ino=2458468 scontext=root:system_r:httpd_t tcontext=system_u:object_r:lib_t tclass=file

/var/log/httpd/error_log:
[Wed Jun 08 16:13:23 2005] [error] [client 127.0.0.1] (13)Permission denied: exec of '/usr/lib/squid/cachemgr.cgi' failed
[Wed Jun 08 16:13:23 2005] [error] [client 127.0.0.1] Premature end of script headers: cachemgr.cgi


Expected Results:  cachemgr.cgi should have executed and allowed access to the cgi script's interface

Additional info:
Comment 2 Daniel Walsh 2005-11-03 17:29:02 EST
Change has been made in upstream version and will be backported to fc4.  You
change should remain for FC3.

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