Bug 1047283

Summary: SELinux is preventing /usr/sbin/httpd from using the 'execstack' accesses on a process.
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, lvrabec, mgrepl, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7ddc0533c5e4658db12bee52821b98bae3c515bbd3bfcbe13cea8c6149315bad
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-02 21:29:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nicolas Mailhot 2013-12-30 10:21:17 UTC
Description of problem:
SELinux is preventing /usr/sbin/httpd from using the 'execstack' accesses on a process.

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

If vous souhaitez autoriser les scripts et modules httpd execmem/execstack
Then vous devez en informer SELinux en activant le booléen « httpd_execmem ».
Vous pouvez lire la page de manuel « httpd_selinux » pour plus de détails.
Do
setsebool -P httpd_execmem 1

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

If vous pensez que httpd devrait être autorisé à accéder execstack sur les processus étiquetés httpd_t par défaut.
Then vous devriez rapporter ceci en tant qu'anomalie.
Vous pouvez générer un module de stratégie local pour autoriser cet accès.
Do
autoriser cet accès pour le moment en exécutant :
# grep httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:httpd_t:s0-s0:c0.c1023
Target Objects                 [ process ]
Source                        httpd
Source Path                   /usr/sbin/httpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           httpd-2.4.7-2.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-10.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.13.0-0.rc3.git5.1.fc21.x86_64 #1
                              SMP Sat Dec 14 15:06:01 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-12-30 03:47:03 CET
Last Seen                     2013-12-30 03:47:03 CET
Local ID                      d4ca95f1-dba3-44b2-b8fb-e9196f23719f

Raw Audit Messages
type=AVC msg=audit(1388371623.21:80451): avc:  denied  { execstack } for  pid=9028 comm="httpd" scontext=system_u:system_r:httpd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:httpd_t:s0-s0:c0.c1023 tclass=process


type=SYSCALL msg=audit(1388371623.21:80451): arch=x86_64 syscall=mprotect success=no exit=EACCES a0=7fff21080000 a1=1000 a2=1000007 a3=0 items=0 ppid=9027 pid=9028 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=1278 tty=(none) comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0-s0:c0.c1023 key=(null)

Hash: httpd,httpd_t,httpd_t,process,execstack

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.13.0-0.rc3.git5.1.fc21.x86_64
type:           libreport

Potential duplicate: bug 680608

Comment 1 Simon Sekidde 2013-12-30 14:59:54 UTC
Nicholas, 

To allow httpd scripts and modules execmem/execstack turn on the boolean 

# setsebool -P httpd_execmem 1

Comment 2 Daniel Walsh 2014-01-02 21:29:56 UTC

*** This bug has been marked as a duplicate of bug 1045699 ***