Bug 540466 - SELinux is preventing /usr/bin/gs "execstack" access.
Summary: SELinux is preventing /usr/bin/gs "execstack" access.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:fbbc72fe08c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-23 13:32 UTC by ashwin
Modified: 2010-01-18 16:44 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-01-18 16:44:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description ashwin 2009-11-23 13:32:36 UTC
Summary:

SELinux is preventing /usr/bin/gs "execstack" access.

Detailed Description:

SELinux denied access requested by gs. It is not expected that this access is
required by gs and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Objects                None [ process ]
Source                        gs
Source Path                   /usr/bin/gs
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           ghostscript-8.70-1.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-41.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.5-127.fc12.i686.PAE #1
                              SMP Sat Nov 7 21:25:57 EST 2009 i686 athlon
Alert Count                   1
First Seen                    Mon 23 Nov 2009 07:00:02 PM IST
Last Seen                     Mon 23 Nov 2009 07:00:02 PM IST
Local ID                      42715067-e53b-43f2-95a6-90ee94d3dced
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1258983002.279:31): avc:  denied  { execstack } for  pid=2377 comm="gs" scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tclass=process

node=(removed) type=SYSCALL msg=audit(1258983002.279:31): arch=40000003 syscall=125 per=400000 success=no exit=-13 a0=bfd8f000 a1=1000 a2=1000007 a3=bfd8dfc0 items=0 ppid=2375 pid=2377 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="gs" exe="/usr/bin/gs" subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-41.fc12,catchall,gs,cupsd_t,cupsd_t,process,execstack
audit2allow suggests:

#============= cupsd_t ==============
allow cupsd_t self:process execstack;

Comment 1 Daniel Walsh 2009-11-23 17:00:45 UTC
This looks like you might have some bad libraries on your system.  Cups and gs should not need execstack.

Do you have some closed source drivers or shared libraries installed?  nvidia
drivers?  rpmfusion codecs?  These are built incorrectly and require a
dangerous priv execstack.  

This link 

http://people.redhat.com/~drepper/selinux-mem.html

explains the access.

You can use the command execstack -q to try to find the libraries with the
execstack flag on, I use a command like

find /usr/lib64 -name \*.so\* -exec execstack -q {} \; -print | grep ^X

Then try to turn off the flag of any libraries that require execstack

execstack -c

And see if the apps work.

Comment 2 Carl G. 2010-01-17 03:17:44 UTC
---

Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers


Note You need to log in before you can comment on or make changes to this bug.