Bug 606712 - SELinux is preventing /home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/bin/python from loading /home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/lib/libpari-gmp.so.2 which requires text relo
Summary: SELinux is preventing /home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_con...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy   
(Show other bugs)
Version: 13
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:7b89889a967...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-22 09:48 UTC by jarl ostensen
Modified: 2010-10-27 19:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-22 12:39:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description jarl ostensen 2010-06-22 09:48:50 UTC

SELinux is preventing
from loading
which requires text relocation.

Detailed Description:

The python application attempted to load
which requires text relocation. This is a potential security problem. Most
libraries do not need this permission. Libraries 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. You can configure SELinux temporarily to allow
to use relocation as a workaround, until the library is fixed. Please file a bug

Allowing Access:

If you trust
to run correctly, you can change the file context to textrel_shlib_t. "chcon -t
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 textrel_shlib_t

Fix Command:

chcon -t textrel_shlib_t

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/jarl/sage-4.4.3-linux-32bit-fedora_release_1
                              gmp.so.2 [ file ]
Source                        python
Source Path                   /home/jarl/sage-4.4.3-linux-32bit-fedora_release_1
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-23.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) #1
                              SMP Fri Jun 11 09:48:40 UTC 2010 i686 i686
Alert Count                   2
First Seen                    Tue 22 Jun 2010 10:46:19 AM BST
Last Seen                     Tue 22 Jun 2010 10:46:19 AM BST
Local ID                      4c46faff-db10-44ce-972a-82fc1d2b094e
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1277199979.784:60): avc:  denied  { execmod } for  pid=29764 comm="python" path="/home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/lib/libpari-gmp.so.2" dev=sda5 ino=1481230 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1277199979.784:60): arch=40000003 syscall=125 success=no exit=-13 a0=5c5b000 a1=29a000 a2=5 a3=bfee0500 items=0 ppid=29745 pid=29764 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts0 ses=1 comm="python" exe="/home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/bin/python" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  allow_execmod,python,unconfined_t,user_home_t,file,execmod
audit2allow suggests:

#============= unconfined_t ==============
#!!!! This avc can be allowed using the boolean 'allow_execmod'

allow unconfined_t user_home_t:file execmod;

Comment 1 Daniel Walsh 2010-06-22 12:39:57 UTC
If you want to this to work in your homedir, it is probably best to turn the check off.

# setsebool -P allow_execmod 1

These failures are caused by badly created libraries.

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