Bug 696544

Summary: SELinux is preventing /usr/local/MGLTools-1.5.4/bin/python from using the 'execstack' accesses on a process.
Product: [Fedora] Fedora Reporter: Mahazmi <mahazmi_mahadi>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE 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:d3954fc881ecd8aa54221e7a0c2a06d5cd9b9c04f8b214b10d282977408da6b9
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-14 13:31:07 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 Mahazmi 2011-04-14 09:20:37 UTC
SELinux is preventing /usr/local/MGLTools-1.5.4/bin/python from using the 'execstack' accesses on a process.

*****  Plugin allow_execstack (53.1 confidence) suggests  ********************

If you believe that 
None
should not require execstack
Then you should clear the execstack flag and see if /usr/local/MGLTools-1.5.4/bin/python works correctly.
Report this as a bug on None.
You can clear the exestack flag by executing:
Do
execstack -c None

*****  Plugin catchall_boolean (42.6 confidence) suggests  *******************

If you want to allow unconfined executables to make their stack executable.  This should never, ever be necessary. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla
Then you must tell SELinux about this by enabling the 'allow_execstack' boolean.
Do
setsebool -P allow_execstack 1

*****  Plugin catchall (5.76 confidence) suggests  ***************************

If you believe that python should be allowed execstack access on processes labeled unconfined_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 python /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                Unknown [ process ]
Source                        python
Source Path                   /usr/local/MGLTools-1.5.4/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-25.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux dahlia 2.6.35.10-74.fc14.i686.PAE #1 SMP Thu
                              Dec 23 16:10:47 UTC 2010 i686 i686
Alert Count                   4
First Seen                    Thu 14 Apr 2011 04:56:40 PM MYT
Last Seen                     Thu 14 Apr 2011 05:05:14 PM MYT
Local ID                      797c8820-4818-4184-b4d3-f6493cf9cee3

Raw Audit Messages
type=AVC msg=audit(1302771914.980:34276): avc:  denied  { execstack } for  pid=3700 comm="python" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process


type=SYSCALL msg=audit(1302771914.980:34276): arch=i386 syscall=mprotect success=no exit=EACCES a0=bff2f000 a1=1000 a2=1000007 a3=bff0d5c8 items=0 ppid=1 pid=3700 auid=501 uid=501 gid=501 euid=501 suid=501 fsuid=501 egid=501 sgid=501 fsgid=501 tty=(none) ses=1 comm=python exe=/usr/local/MGLTools-1.5.4/bin/python subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash: python,unconfined_t,unconfined_t,process,execstack

audit2allow

#============= unconfined_t ==============
#!!!! This avc can be allowed using the boolean 'allow_execstack'

allow unconfined_t self:process execstack;

audit2allow -R

#============= unconfined_t ==============
#!!!! This avc can be allowed using the boolean 'allow_execstack'

allow unconfined_t self:process execstack;

Comment 1 Daniel Walsh 2011-04-14 13:31:07 UTC

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