Bug 592326 - SELinux is preventing /usr/bin/Xorg from loading /usr/lib/dri/fglrx_dri.so which requires text relocation.
Summary: SELinux is preventing /usr/bin/Xorg from loading /usr/lib/dri/fglrx_dri.so wh...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:95569886886...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-14 15:10 UTC by Ray Pete
Modified: 2010-09-22 13:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-05-14 15:17:29 UTC
Type: ---

Attachments (Terms of Use)

Description Ray Pete 2010-05-14 15:10:46 UTC

SELinux is preventing /usr/bin/Xorg from loading /usr/lib/dri/fglrx_dri.so which
requires text relocation.

Detailed Description:

The Xorg application attempted to load /usr/lib/dri/fglrx_dri.so 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/dri/fglrx_dri.so to use relocation as a workaround, until the library
is fixed. Please file a bug report.

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/lib/dri/fglrx_dri.so'

Additional Information:

Source Context                system_u:system_r:xserver_t:s0-s0:c0.c1023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/lib/dri/fglrx_dri.so [ file ]
Source                        Xorg
Source Path                   /usr/bin/Xorg
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xorg-x11-server-Xorg-1.7.6-4.fc12
Target RPM Packages           xorg-x11-drv-catalyst-libs-10.4-2.fc12
Policy RPM                    selinux-policy-3.6.32-113.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed)
                     #1 SMP Mon Apr 5
                              16:15:03 EDT 2010 i686 athlon
Alert Count                   10
First Seen                    Thu 29 Apr 2010 12:56:25 PM EDT
Last Seen                     Fri 14 May 2010 11:07:23 AM EDT
Local ID                      bcd8a6dc-1484-4c83-ad76-9b2a15cd5651
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1273849643.100:6): avc:  denied  { execmod } for  pid=1622 comm="Xorg" path="/usr/lib/dri/fglrx_dri.so" dev=dm-0 ino=157749 scontext=system_u:system_r:xserver_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1273849643.100:6): arch=40000003 syscall=125 success=no exit=-13 a0=2f8b000 a1=1976000 a2=5 a3=bfb3e890 items=0 ppid=1621 pid=1622 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty1 ses=4294967295 comm="Xorg" exe="/usr/bin/Xorg" subj=system_u:system_r:xserver_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  allow_execmod,Xorg,xserver_t,lib_t,file,execmod
audit2allow suggests:

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

allow xserver_t lib_t:file execmod;

Comment 1 Daniel Walsh 2010-05-14 15:17:29 UTC
Bug report covers the solution, either change the context or run

#setsebool -P allow_execmod 1

To remove the check.

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