Bug 537675

Summary: SELinux is preventing /usr/bin/aticonfig from making the program stack executable.
Product: [Fedora] Fedora Reporter: Petr Mejzlík <petrmej>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:e67d0bff8cbfc0b7f3f39624c86d28d80c45f647488cb4a3e414449d061541a7
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-23 16:57:55 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 Petr Mejzlík 2009-11-15 17:22:51 UTC
Souhrn:

SELinux is preventing /usr/bin/aticonfig from making the program stack
executable.

Podrobný popis:

[SELinux is in permissive mode. This access was not denied.]

The aticonfig application attempted to make its stack executable. This is a
potential security problem. This should never ever be necessary. Stack memory is
not executable on most OSes these days and this will not change. Executable
stack memory is one of the biggest security problems. An execstack error might
in fact be most likely raised by malicious code. Applications are sometimes
coded incorrectly and request this permission. The SELinux Memory Protection
Tests (http://people.redhat.com/drepper/selinux-mem.html) web page explains how
to remove this requirement. If aticonfig does not work and you need it to work,
you can configure SELinux temporarily to allow this access until the application
is fixed. Please file a bug report.

Povolení přístupu:

Sometimes a library is accidentally marked with the execstack flag, if you find
a library with this flag you can clear it with the execstack -c LIBRARY_PATH.
Then retry your application. If the app continues to not work, you can turn the
flag back on with execstack -s LIBRARY_PATH. Otherwise, if you trust aticonfig
to run correctly, you can change the context of the executable to
execmem_exec_t. "chcon -t execmem_exec_t '/usr/bin/aticonfig'" You must also
change the default file context files on the system in order to preserve them
even on a full relabel. "semanage fcontext -a -t execmem_exec_t
'/usr/bin/aticonfig'"

Příkaz pro opravu:

chcon -t execmem_exec_t '/usr/bin/aticonfig'

Další informace:

Kontext zdroje                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Kontext cíle                 unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Objekty cíle                 None [ process ]
Zdroj                         aticonfig
Cesta zdroje                  /usr/bin/aticonfig
Port                          <Neznámé>
Počítač                    (removed)
RPM balíčky zdroje          
RPM balíčky cíle           
RPM politiky                  selinux-policy-3.6.32-24.fc12
Selinux povolen               True
Typ politiky                  targeted
MLS povoleno                  True
Vynucovací režim            Permissive
Název zásuvného modulu     allow_execstack
Název počítače            (removed)
Platforma                     Linux (removed) 2.6.31.1-56.fc12.i686.PAE #1 SMP Tue
                              Sep 29 16:16:16 EDT 2009 i686 i686
Počet upozornění           1
Poprvé viděno               Ne 15. listopad 2009, 18:21:48 CET
Naposledy viděno             Ne 15. listopad 2009, 18:21:48 CET
Místní ID                   7590f040-31e8-44ef-91db-de37ed9ffb4f
Čísla řádků              

Původní zprávy auditu      

node=(removed) type=AVC msg=audit(1258305708.558:62): avc:  denied  { execstack } for  pid=17427 comm="aticonfig" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process

node=(removed) type=SYSCALL msg=audit(1258305708.558:62): arch=40000003 syscall=125 success=yes exit=0 a0=bfbd9000 a1=1000 a2=1000007 a3=bfbd91d4 items=0 ppid=17409 pid=17427 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="aticonfig" exe="/usr/bin/aticonfig" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-24.fc12,allow_execstack,aticonfig,unconfined_t,unconfined_t,process,execstack
audit2allow suggests:

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

Comment 1 Bug Zapper 2009-11-16 15:33:32 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Daniel Walsh 2009-11-16 16:00:29 UTC
Are you using the nvidia drivers?

Please update to the latest released code, although I don't believe this will fix your problem.

yum -y upgrade

You can turn on the allow_execstack boolean to allow aticonfig to work.

Or try 

chcon -t execmem_exec_t /usr/bin/aticonfig

Comment 3 Daniel Walsh 2009-12-23 16:57:55 UTC

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