Bug 751245

Summary: SELinux is preventing /usr/libexec/gnome-session-check-accelerated-helper from 'execmod' accesses on the file /usr/lib/dri/fglrx_dri.so.
Product: [Fedora] Fedora Reporter: Matt <matthew.savage.4>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, lovenemesis, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:c0b705eca928e8faf6c2e328fdfe068abfd2655aa573c0733400e3569bbc1eb5
Fixed In Version: selinux-policy-3.9.16-48.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-04 02:38:35 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:

Description Matt 2011-11-04 02:31:24 UTC
SELinux is preventing /usr/libexec/gnome-session-check-accelerated-helper from 'execmod' accesses on the file /usr/lib/dri/fglrx_dri.so.

*****  Plugin allow_execmod (91.4 confidence) suggests  **********************

If you want to allow gnome-session-check-accelerated-helper to have execmod access on the fglrx_dri.so file
Then you need to change the label on '/usr/lib/dri/fglrx_dri.so'
Do
# semanage fcontext -a -t textrel_shlib_t '/usr/lib/dri/fglrx_dri.so'
# restorecon -v '/usr/lib/dri/fglrx_dri.so'

*****  Plugin catchall (9.59 confidence) suggests  ***************************

If you believe that gnome-session-check-accelerated-helper should be allowed execmod access on the fglrx_dri.so file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep gnome-session-c /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/lib/dri/fglrx_dri.so [ file ]
Source                        gnome-session-c
Source Path                   /usr/libexec/gnome-session-check-accelerated-
                              helper
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-session-3.0.1-2.fc15
Target RPM Packages           xorg-x11-drv-catalyst-libs-11.9-1.fc15
Policy RPM                    selinux-policy-3.9.16-44.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.6-0.fc15.i686
                              #1 SMP Tue Oct 4 00:51:19 UTC 2011 i686 i686
Alert Count                   16
First Seen                    Sun 02 Oct 2011 12:41:28 PM EDT
Last Seen                     Thu 03 Nov 2011 09:35:01 PM EDT
Local ID                      31a53bce-77a2-4a96-ae2d-f69d68b73b40

Raw Audit Messages
type=AVC msg=audit(1320370501.78:70): avc:  denied  { execmod } for  pid=1564 comm="gnome-session-c" path="/usr/lib/dri/fglrx_dri.so" dev=dm-1 ino=149033 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file


type=SYSCALL msg=audit(1320370501.78:70): arch=i386 syscall=mprotect success=no exit=EACCES a0=55c000 a1=1eb7000 a2=5 a3=bfae2ce0 items=0 ppid=1559 pid=1564 auid=4294967295 uid=42 gid=42 euid=42 suid=42 fsuid=42 egid=42 sgid=42 fsgid=42 tty=(none) ses=4294967295 comm=gnome-session-c exe=/usr/libexec/gnome-session-check-accelerated-helper subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: gnome-session-c,xdm_t,lib_t,file,execmod

audit2allow

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

audit2allow -R

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

Comment 1 Miroslav Grepl 2011-11-04 10:47:46 UTC
For now execute

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

Comment 2 Fedora Update System 2011-11-16 16:20:16 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 3 Fedora Update System 2011-11-17 23:38:37 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 4 Tommy He 2011-11-22 12:50:18 UTC
The exactly problem happens to Fedora 16 with xorg-x11-drv-catalyst-11.11-2.fc16.i686

selinux-policy-3.10.0-56.fc16.noarch

Nov 22 20:32:51 localhost setroubleshoot: SELinux is preventing /usr/libexec/gnome-session-check-accelerated-helper from execmod access on the file /usr/lib/dri/fglrx_dri.so. For complete SELinux messages. run sealert -l d27a8974-c4b5-4823-ae08-9ba330b44ec2
Nov 22 20:32:51 localhost setroubleshoot: SELinux is preventing /usr/libexec/gnome-session-check-accelerated-helper from execmod access on the file /usr/lib/dri/fglrx_dri.so. For complete SELinux messages. run sealert -l d27a8974-c4b5-4823-ae08-9ba330b44ec2

Comment 5 Miroslav Grepl 2011-11-23 08:36:42 UTC
Ok, execute

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

also for F16.

Comment 6 Fedora Update System 2011-12-04 02:38:35 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.