Bug 725527

Summary: SELinux is preventing /usr/bin/pdextended from using the 'execstack' accesses on a process.
Product: [Fedora] Fedora Reporter: Mikhail <miliatov>
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: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:22aae1a612928ef65d14d14f72a36b8c5b676cb36cb6f972cee68343313540a0
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-08 20:20:20 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 Mikhail 2011-07-25 19:04:41 UTC
SELinux is preventing /usr/bin/pdextended 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/bin/pdextended 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 pdextended 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 pdextended /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                        pdextended
Source Path                   /usr/bin/pdextended
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           pd-extended-0.42.5-1.fc14.ccrma
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-42.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux muwa 2.6.35.13-92.fc14.i686 #1 SMP Sat May
                              21 17:39:42 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Mon 25 Jul 2011 02:53:39 PM EDT
Last Seen                     Mon 25 Jul 2011 02:53:39 PM EDT
Local ID                      f1dcf51e-f4c9-490d-ad78-cad7e581c93c

Raw Audit Messages
type=AVC msg=audit(1311620019.594:18): avc:  denied  { execstack } for  pid=2077 comm="pdextended" 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(1311620019.594:18): arch=i386 syscall=mprotect success=no exit=EACCES a0=bfec6000 a1=1000 a2=1000007 a3=bfec2980 items=0 ppid=1680 pid=2077 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm=pdextended exe=/usr/bin/pdextended subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash: pdextended,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-07-25 19:11:01 UTC
The alert told you what to do.  The app should not require this.  Do you know what this tool was written with?

Comment 2 Mikhail 2011-07-25 19:37:38 UTC
This happens when I start puredata-extended application. Don't know what it was written with, I got it form RPM Fusion.

Comment 3 Mikhail 2011-07-25 19:38:29 UTC
(In reply to comment #1)
> The alert told you what to do.  The app should not require this.  Do you know
> what this tool was written with?

This happens when I start puredata-extended application. Don't know what it was
written with, I got it from RPM Fusion.

Comment 4 Daniel Walsh 2011-07-25 19:59:59 UTC
If you run execstack on it what does it say.

execstack -q /usr/bin/pdextended 

You can turn on the boolean if you want and the app is blowing up.

Comment 5 Mikhail 2011-07-25 20:27:21 UTC
it returns -/usr/bin/pdextended  

On startup of the application, PureData shows error: 

usr/lib/pd-extended/extra/pdp/pdp.pd_linux: cannot enable executable stack as shared object requires: Permission denied. 
pdp: can't load library

I'll try to to find if there's info about this on puredata forums, there seems to be a lot of talk about the problem

Thanks,
M.

Comment 6 Daniel Walsh 2011-07-25 20:43:29 UTC
execstack -q /usr/lib/pd-extended/extra/pdp/pdp.pd_linux