Bug 592325

Summary: SELinux is preventing /usr/bin/aticonfig from loading /usr/lib/catalyst/libatiadlxx.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: dwalsh, mgrepl, nocountryman
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:b8daaef660b39eb4919eb488ffc83fed2b9eb90d71d115fc3b728bde8a68a9d6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-14 15:18:08 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 Ray Pete 2010-05-14 15:10:02 UTC
Summary:

SELinux is preventing /usr/bin/aticonfig from loading
/usr/lib/catalyst/libatiadlxx.so which requires text relocation.

Detailed Description:

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

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/lib/catalyst/libatiadlxx.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_execmem_t:s0-
                              s0:c0.c1023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/lib/catalyst/libatiadlxx.so [ file ]
Source                        aticonfig
Source Path                   /usr/bin/aticonfig
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xorg-x11-drv-catalyst-10.4-2.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                Permissive
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                   1
First Seen                    Fri 14 May 2010 07:44:27 AM EDT
Last Seen                     Fri 14 May 2010 07:44:27 AM EDT
Local ID                      315ce2e8-a9a4-4b41-9d02-21c7ce843498
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1273837467.291:18): avc:  denied  { execmod } for  pid=5696 comm="aticonfig" path="/usr/lib/catalyst/libatiadlxx.so" dev=dm-0 ino=530600 scontext=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1273837467.291:18): arch=40000003 syscall=125 success=yes exit=0 a0=55b000 a1=2e000 a2=5 a3=bfd58100 items=0 ppid=5060 pid=5696 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts0 ses=1 comm="aticonfig" exe="/usr/bin/aticonfig" subj=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,aticonfig,unconfined_execmem_t,lib_t,file,execmod
audit2allow suggests:

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

allow unconfined_execmem_t lib_t:file execmod;

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

#setsebool -P allow_execmod 1


To remove the check.