Bug 473995 - SELinux config and Apache config disagree about whether cgi scripts are allowed
SELinux config and Apache config disagree about whether cgi scripts are allowed
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2008-12-01 13:43 EST by Ed Avis
Modified: 2009-11-18 08:00 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-11-18 08:00:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ed Avis 2008-12-01 13:43:53 EST
Out of the box, httpd on Fedora 10 is configured to execute cgi scripts placed in the /var/www/cgi-bin directory, but SELinux is configured to disallow them.

It doesn't make much sense to ship two configurations which contradict each other.  If you feel that executing cgi scripts should be disabled by default, change the Apache configuration so that it does not turn them on.  OTOH, if the intention is to have this functionality turned on, the SELinux policy must change.  Either way the two sets of permissions should not say different things.
Comment 1 Daniel Walsh 2008-12-01 14:25:01 EST
httpd_enable_cgi boolean is turned on by default in F10?
Comment 2 Ed Avis 2008-12-02 11:32:25 EST
>httpd_enable_cgi boolean is turned on by default in F10?

I don't think so; I installed a system from the i386 live CD but when I tried to run a CGI script it failed with an AVC denial and the diagnostic message said I should turn on this boolean.  When I did so, the script could run.

So as far as I can tell, F10 ships with CGI scripts enabled in the Apache config but disabled in the SELinux policy.

Could I ask you to have another look at this?  If you wish, I will do a clean install from the CD so we can find out what the default setting really is.
Comment 3 Daniel Walsh 2008-12-02 11:49:48 EST
Yes could you do this.  Fresh install and then 

getsebool httpd_enable_cgi

On my installed machines, I am doing a 

semanage boolean -D 

Which deletes all customizations and it shows it enabled.
Comment 4 Daniel Walsh 2008-12-02 14:14:50 EST
Looks like you are right.  selinux-policy-3.5.13-26 fixes this as a default, but will not change machines on upgrades.
Comment 5 Ed Avis 2008-12-03 06:54:33 EST
OK, cool.  So it will be fixed in Fedora 11 (or if a respin of F10 is released with the updated package).
Comment 6 Daniel Walsh 2008-12-03 10:21:39 EST
Comment 7 Bug Zapper 2009-06-09 06:03:58 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
Comment 8 Ed Avis 2009-08-16 11:02:02 EDT
Changing version back to 10 to fix mistaken Bug Zapper change.  This is a bug against Fedora 10.
Comment 9 Bug Zapper 2009-11-18 05:15:35 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 10 Daniel Walsh 2009-11-18 08:00:11 EST
Closing as current release

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