Bug 680608

Summary: SELinux is preventing /usr/sbin/httpd from using the 'execstack' accesses on a process.
Product: [Fedora] Fedora Reporter: Bill Thielman <b.thielman>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:7ddc0533c5e4658db12bee52821b98bae3c515bbd3bfcbe13cea8c6149315bad
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-28 09:03:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Bill Thielman 2011-02-26 11:37:44 UTC
SELinux is preventing /usr/sbin/httpd from using the 'execstack' accesses on a process.

*****  Plugin catchall_boolean (89.3 confidence) suggests  *******************

If you want to allow httpd scripts and modules execmem/execstack
Then you must tell SELinux about this by enabling the 'httpd_execmem' boolean.
Do
setsebool -P httpd_execmem 1

*****  Plugin catchall (11.6 confidence) suggests  ***************************

If you believe that httpd should be allowed execstack access on processes labeled httpd_t by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:httpd_t:s0
Target Context                unconfined_u:system_r:httpd_t:s0
Target Objects                Unknown [ process ]
Source                        httpd
Source Path                   /usr/sbin/httpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           httpd-2.2.17-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.i686 #1 SMP
                              Mon Feb 7 07:04:18 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Sat 26 Feb 2011 06:31:48 AM EST
Last Seen                     Sat 26 Feb 2011 06:31:48 AM EST
Local ID                      a4c8bba9-b8e5-43f1-96cb-7ae7a76123d9

Raw Audit Messages
type=AVC msg=audit(1298719908.21:29913): avc:  denied  { execstack } for  pid=8250 comm="httpd" scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:system_r:httpd_t:s0 tclass=process


type=SYSCALL msg=audit(1298719908.21:29913): arch=i386 syscall=mprotect success=no exit=EACCES a0=bfd2f000 a1=1000 a2=1000007 a3=bfd2f524 items=0 ppid=1 pid=8250 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm=httpd exe=/usr/sbin/httpd subj=unconfined_u:system_r:httpd_t:s0 key=(null)

Hash: httpd,httpd_t,httpd_t,process,execstack

audit2allow

#============= httpd_t ==============
#!!!! This avc is allowed in the current policy

allow httpd_t self:process execstack;

audit2allow -R

#============= httpd_t ==============
#!!!! This avc is allowed in the current policy

allow httpd_t self:process execstack;

Comment 1 Miroslav Grepl 2011-02-28 09:03:13 UTC
This can be allowed using the boolean which sealert tells you


*****  Plugin catchall_boolean (89.3 confidence) suggests  *******************

If you want to allow httpd scripts and modules execmem/execstack
Then you must tell SELinux about this by enabling the 'httpd_execmem' boolean.
Do
setsebool -P httpd_execmem 1


Are you using mod_mono?