Bug 676833

Summary: SELinux is preventing /opt/rapid7/nexpose/nsc/.DLLCACHE/nexserv from using the 'execstack' accesses on a process.
Product: [Fedora] Fedora Reporter: Katalyst <katalystk>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:22df5fe67881dd0b9106140a303381918c52aead0c04ddc8bd498c09878326bc
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-11 15:29:16 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 Katalyst 2011-02-11 13:16:53 UTC
SELinux is preventing /opt/rapid7/nexpose/nsc/.DLLCACHE/nexserv 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 /opt/rapid7/nexpose/nsc/.DLLCACHE/nexserv 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 nexserv 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 nexserv /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                        nexserv
Source Path                   /opt/rapid7/nexpose/nsc/.DLLCACHE/nexserv
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-29.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.x86_64 #1 SMP Mon
                              Feb 7 07:06:44 UTC 2011 x86_64 x86_64
Alert Count                   4
First Seen                    Fri 11 Feb 2011 06:45:25 PM IST
Last Seen                     Fri 11 Feb 2011 06:45:25 PM IST
Local ID                      d38574a7-0b06-4f79-8ec8-f569a0eb4976

Raw Audit Messages
type=AVC msg=audit(1297430125.952:449): avc:  denied  { execstack } for  pid=22109 comm="nexserv" 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(1297430125.952:449): arch=x86_64 syscall=mprotect success=no exit=EACCES a0=7fff53827000 a1=1000 a2=1000007 a3=36ac81f000 items=0 ppid=22043 pid=22109 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=1 comm=nexserv exe=/opt/rapid7/nexpose/nsc/.DLLCACHE/nexserv subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash: nexserv,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-02-11 16:46:27 UTC
Do you know what this is  /opt/rapid7/nexpose/nsc/.DLLCACHE/nexserv? Is it written in Java?  You could label it execmem_exec_t or turn off the access check.

# semanage fcontext -a -t execmem_exec_t /opt/rapid7/nexpose/nsc/.DLLCACHE/nexserv
# restorecon -R -v /opt/rapid7