Bug 515827

Summary: Selinux is preventing access to /usr/lib/libGL.so.1.2
Product: [Fedora] Fedora Reporter: Sebastian Vahl <fedora>
Component: mesaAssignee: Adam Jackson <ajax>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: rawhideCC: ajax, dcantrell, kevin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-06 22:29:25 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:
Bug Depends On:    
Bug Blocks: 473303, 507676    

Description Sebastian Vahl 2009-08-05 20:51:12 UTC
Version-Release number of selected component (if applicable):
mesa-libGL-7.6-0.7.fc12
selinux-policy-3.6.26-2.fc12


Additional info:
Summary:

SELinux is preventing plasma-desktop from loading /usr/lib/libGL.so.1.2 which
requires text relocation.

Detailed Description:

[SELinux is in permissive mode, the operation would have been denied but was
permitted due to permissive mode.]

The plasma-desktop application attempted to load /usr/lib/libGL.so.1.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
/usr/lib/libGL.so.1.2 to use relocation as a workaround, until the library is
fixed. Please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.

Allowing Access:

If you trust /usr/lib/libGL.so.1.2 to run correctly, you can change the file
context to textrel_shlib_t. "chcon -t textrel_shlib_t '/usr/lib/libGL.so.1.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
'/usr/lib/libGL.so.1.2'"

Fix Command:

chcon -t textrel_shlib_t '/usr/lib/libGL.so.1.2'

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                /usr/lib/libGL.so.1.2 [ file ]
Source                        ksmserver
Source Path                   /usr/bin/ksmserver
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           kdebase-workspace-4.3.0-1.fc12
Target RPM Packages           mesa-libGL-7.6-0.7.fc12
Policy RPM                    selinux-policy-3.6.26-2.fc12
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Permissive
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.31-0.112.rc4.git3.fc12.i686 #1 SMP Thu Jul 30
                              15:43:29 EDT 2009 i686 athlon
Alert Count                   2
First Seen                    Wed 05 Aug 2009 10:35:30 PM EDT
Last Seen                     Wed 05 Aug 2009 10:35:39 PM EDT
Local ID                      4984aa7c-3b4d-4c78-9702-02f17e4bf9b8
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1249526139.583:10386): avc:  denied  { execmod } for  pid=1961 comm="plasma-desktop" path="/usr/lib/libGL.so.1.2" 
dev=dm-0 ino=47216 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1249526139.583:10386): arch=40000003 syscall=125 success=yes exit=0 a0=68e2000 a1=6f000 a2=5 a3=bfba7730 
items=0 ppid=1805 pid=1961 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="plasma-desktop" 
exe="/usr/bin/plasma-desktop" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Comment 1 Kevin Kofler 2009-08-05 20:59:00 UTC
This makes the KDE spin entirely unusable unless you manually boot with selinux=0 or equivalent.

Comment 2 Jesse Keating 2009-08-06 22:29:25 UTC
A fixed mesa has been built and tagged for the Alpha.