Bug 542630 - SELinux is preventing Xorg from loading /usr/lib/xorg/modules/extensions/libglx.so.195.22 which requires text relocation.
Summary: SELinux is preventing Xorg from loading /usr/lib/xorg/modules/extensions/libg...
Keywords:
Status: CLOSED ERRATA
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:7c999e778c0...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-30 12:12 UTC by Joel Kirchmeyer
Modified: 2010-08-20 01:43 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.6.32-120.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-01 19:10:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joel Kirchmeyer 2009-11-30 12:12:39 UTC
Summary:

SELinux is preventing Xorg from loading
/usr/lib/xorg/modules/extensions/libglx.so.195.22 which requires text
relocation.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/lib/xorg/modules/extensions/libglx.so.195.22'

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/xorg/modules/extensions/libglx.so.195.22
                              [ file ]
Source                        Xorg
Source Path                   Xorg
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-46.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32-rc8 #2 SMP Sun
                              Nov 29 16:05:36 EST 2009 i686 i686
Alert Count                   4
First Seen                    Sun 29 Nov 2009 04:32:55 PM EST
Last Seen                     Mon 30 Nov 2009 07:00:43 AM EST
Local ID                      6807ede7-08c6-41ba-839f-c6640aa400d7
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1259582443.760:29): avc:  denied  { execmod } for  pid=5496 comm="Xorg" path="/usr/lib/xorg/modules/extensions/libglx.so.195.22" dev=dm-0 ino=229963 scontext=system_u:system_r:xserver_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file



Hash String generated from  selinux-policy-3.6.32-46.fc12,allow_execmod,Xorg,xserver_t,lib_t,file,execmod
audit2allow suggests:

#============= xserver_t ==============
allow xserver_t lib_t:file execmod;

Comment 1 Daniel Walsh 2009-11-30 15:06:42 UTC
Fixed in selinux-policy-3.6.32-52.fc12.noarch

Execute the chcon command suggested in the alert.

Comment 2 Fedora Update System 2009-12-01 16:54:23 UTC
selinux-policy-3.6.32-52.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-52.fc12

Comment 3 Adam Williamson 2009-12-03 18:00:16 UTC
note that this file comes from the NVIDIA driver and will change name every time that driver changes version - the 195.22 is the NVIDIA driver version. Will this break every time NVIDIA releases a new driver?

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 4 Daniel Walsh 2009-12-03 18:58:46 UTC
This is the regular expression that it matches.

/usr/lib(64)?/xorg/modules/extensions/libglx\.so(\.[^/]*)* -- gen_context(system_u:object_r:textrel_shlib_t,s0)

So it should handle it.  Although it would be good if nvidia could learn to build proper libraries.

Comment 5 Adam Williamson 2009-12-03 19:32:22 UTC
"Although it would be good if nvidia could learn to build proper libraries."

we live in hope :)

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 6 Fedora Update System 2009-12-03 20:26:24 UTC
selinux-policy-3.6.32-55.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-55.fc12

Comment 7 Fedora Update System 2009-12-08 07:51:10 UTC
selinux-policy-3.6.32-55.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2010-08-05 13:17:38 UTC
selinux-policy-3.6.32-120.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-120.fc12

Comment 9 Fedora Update System 2010-08-20 01:38:04 UTC
selinux-policy-3.6.32-120.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


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