Bug 587705 - SELinux is preventing /opt/MATHWORKS_R2008A/bin/glnx86/MATLAB from loading /opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001 which requires text relocation.
Summary: SELinux is preventing /opt/MATHWORKS_R2008A/bin/glnx86/MATLAB from loading /o...
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:037f96e14d6...
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-30 16:03 UTC by cstent
Modified: 2010-05-03 09:05 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2010-05-03 09:05:18 UTC


Attachments (Terms of Use)

Description cstent 2010-04-30 16:03:02 UTC
Summary:

SELinux is preventing /opt/MATHWORKS_R2008A/bin/glnx86/MATLAB from loading
/opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001 which requires
text relocation.

Detailed Description:

The MATLAB application attempted to load
/opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001 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
/opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001 to use
relocation as a workaround, until the library is fixed. Please file a bug
report.

Allowing Access:

If you trust /opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001 to
run correctly, you can change the file context to textrel_shlib_t. "chcon -t
textrel_shlib_t
'/opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001'" 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
'/opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001'"

Fix Command:

chcon -t textrel_shlib_t
'/opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.
                              so.1.5.060001 [ file ]
Source                        MATLAB
Source Path                   /opt/MATHWORKS_R2008A/bin/glnx86/MATLAB
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-110.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux Newton.survey.ntua.gr 2.6.32.11-99.fc12.i686
                              #1 SMP Mon Apr 5 16:32:08 EDT 2010 i686 i686
Alert Count                   6
First Seen                    Fri 30 Apr 2010 11:22:00 AM EEST
Last Seen                     Fri 30 Apr 2010 06:42:48 PM EEST
Local ID                      8f10457e-562c-4926-88d4-acb18e997f5a
Line Numbers                  

Raw Audit Messages            

node=Newton.survey.ntua.gr type=AVC msg=audit(1272642168.769:24): avc:  denied  { execmod } for  pid=4216 comm="MATLAB" path="/opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001" dev=sda1 ino=82379 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=Newton.survey.ntua.gr type=SYSCALL msg=audit(1272642168.769:24): arch=40000003 syscall=125 success=no exit=-13 a0=65a0000 a1=22a000 a2=5 a3=3e624f0 items=0 ppid=4151 pid=4216 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts0 ses=1 comm="MATLAB" exe="/opt/MATHWORKS_R2008A/bin/glnx86/MATLAB" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,MATLAB,unconfined_t,lib_t,file,execmod
audit2allow suggests:

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

allow unconfined_t lib_t:file execmod;

Comment 1 Miroslav Grepl 2010-05-03 09:05:18 UTC
Execute the chcon command suggested in the alert.

# chcon -t textrel_shlib_t
'/opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001'


To make this permanent

# semanage fcontext -a -t textrel_shlib_t
'/opt/MATHWORKS_R2008A/sys/opengl/lib/glnx86/libGL.so.1.5.060001'


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