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...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:7b89889a967...
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2010-06-22 12:39:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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

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 relocation.

Detailed Description:

The python application attempted to load
/home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/lib/libpari-gmp.so.2
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
/home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/lib/libpari-gmp.so.2
to use relocation as a workaround, until the library is fixed. Please file a bug
report.

Allowing Access:

If you trust
/home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/lib/libpari-gmp.so.2
to run correctly, you can change the file context to textrel_shlib_t. "chcon -t
textrel_shlib_t
'/home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/lib/libpari-gmp.so.2'"
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
'/home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/lib/libpari-gmp.so.2'"

Fix Command:

chcon -t textrel_shlib_t
'/home/jarl/sage-4.4.3-linux-32bit-fedora_release_12_constantine_-i686-Linux/local/lib/libpari-gmp.so.2'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/jarl/sage-4.4.3-linux-32bit-fedora_release_1
                              2_constantine_-i686-Linux/local/lib/libpari-
                              gmp.so.2 [ file ]
Source                        python
Source Path                   /home/jarl/sage-4.4.3-linux-32bit-fedora_release_1
                              2_constantine_-i686-Linux/local/bin/python
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) 2.6.33.5-124.fc13.i686 #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.