Bug 592326

Summary: SELinux is preventing /usr/bin/Xorg from loading /usr/lib/dri/fglrx_dri.so which requires text relocation.
Product: [Fedora] Fedora Reporter: Ray Pete <fnshman>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dkanunnikau, dwalsh, kurtmc, martin, mgrepl, nocountryman
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:95569886886e6c013d3338cae5ca4b68ecbcf4b02e416f1ff81584971db8601f
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-14 15:17:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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

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)
                              2.6.32.11-99.fc12.i686.PAE #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.