Bug 522852

Summary: setroubleshoot: SELinux is preventing /usr/bin/totem from making the program stack executable.
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: camilo, dwalsh, jkubin, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:2d9876e8e05e9df400d55c978fceefb2e97afe3243ecf0c9d6ae381c12b24922
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-11 20:01:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Nicolas Mailhot 2009-09-11 19:23:58 UTC
The following was filed automatically by setroubleshoot:

Résumé:

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

Description détaillée:

[nautilus has a permissive type (unconfined_t). This access was not denied.]

The totem 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 totem 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.

Autoriser l'accès:

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 totem to
run correctly, you can change the context of the executable to execmem_exec_t.
"chcon -t execmem_exec_t '/usr/bin/totem'" 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/totem'"

Commande de correction:

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

Informations complémentaires:

Contexte source               unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Contexte cible                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Objets du contexte            None [ process ]
source                        nautilus
Chemin de la source           /usr/bin/nautilus
Port                          <Inconnu>
Hôte                         (removed)
Paquetages RPM source         totem-2.27.92-1.fc12
Paquetages RPM cible          
Politique RPM                 selinux-policy-3.6.31-2.fc12
Selinux activé               True
Type de politique             targeted
MLS activé                   True
Mode strict                   Enforcing
Nom du plugin                 allow_execstack
Nom de l'hôte                (removed)
Plateforme                    Linux (removed) 2.6.31-2.fc12.x86_64 #1 SMP Thu
                              Sep 10 00:25:40 EDT 2009 x86_64 x86_64
Compteur d'alertes            6
Première alerte              ven. 11 sept. 2009 20:39:18 CEST
Dernière alerte              ven. 11 sept. 2009 21:05:12 CEST
ID local                      2cec03da-6fdf-4d67-9d10-6e033418afdb
Numéros des lignes           

Messages d'audit bruts        

node=(removed) type=AVC msg=audit(1252695912.180:71): avc:  denied  { execstack } for  pid=3103 comm="totem" 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=AVC msg=audit(1252695912.180:71): avc:  denied  { execmem } for  pid=3103 comm="totem" 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(1252695912.180:71): arch=c000003e syscall=10 success=yes exit=0 a0=7fff8b950000 a1=1000 a2=1000007 a3=7fafbebb8af9 items=0 ppid=1 pid=3103 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=3 comm="totem" exe="/usr/bin/totem" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)


audit2allow suggests:

#============= unconfined_t ==============
allow unconfined_t self:process { execstack execmem };

Comment 1 Daniel Walsh 2009-09-11 20:01:36 UTC
I have a feeling this is caused by the codecs you have installed.   If so you options are to attempt set the context on totem as described by the bugzilla or turn off you execstack/execmem protection for user processes by executing

setsebool -P allow_execstack 1
 
You might want to report this as a bug to to codec providers.

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