Bug 546027

Summary: SELinux is preventing /usr/local/games/darwinia/lib/darwinia.bin.x86 from loading /usr/local/games/darwinia/lib/libSDL-1.2.so.0 which requires text relocation.
Product: [Fedora] Fedora Reporter: herra_pilvinen
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:bb85a8e99f0a4ce04652e6e5a88dc8e628da08a5bc2484837124c9571092ade0
Fixed In Version: 3.6.32-66.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-08 20:08:03 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 herra_pilvinen 2009-12-09 20:23:57 UTC
Yhteenveto:

SELinux is preventing /usr/local/games/darwinia/lib/darwinia.bin.x86 from
loading /usr/local/games/darwinia/lib/libSDL-1.2.so.0 which requires text
relocation.

Yksityiskohtainen kuvaus:

The darwinia.bin.x8 application attempted to load
/usr/local/games/darwinia/lib/libSDL-1.2.so.0 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/local/games/darwinia/lib/libSDL-1.2.so.0 to use relocation as a workaround,
until the library is fixed. Please file a bug report.

Sallitaan pääsy:

If you trust /usr/local/games/darwinia/lib/libSDL-1.2.so.0 to run correctly, you
can change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t
'/usr/local/games/darwinia/lib/libSDL-1.2.so.0'" 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/local/games/darwinia/lib/libSDL-1.2.so.0'"

Korjauskomento:

chcon -t textrel_shlib_t '/usr/local/games/darwinia/lib/libSDL-1.2.so.0'

Lisätiedot:

Lähdekonteksti               unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Kohdekonteksti                system_u:object_r:lib_t:s0
Kohdeobjektit                 /usr/local/games/darwinia/lib/libSDL-1.2.so.0 [
                              file ]
Lähde                        darwinia.bin.x8
Lähteen polku                /usr/local/games/darwinia/lib/darwinia.bin.x86
Portti                        <Tuntematon>
Kone                          (removed)
Lähteen RPM-paketit          
Kohteen RPM-paketit           
Käytännön RPM              selinux-policy-3.6.32-55.fc12
SELinux käytössä           True
Käytännön tyyppi           targeted
Toimeenpanotila               Enforcing
Liitännäisen nimi           allow_execmod
Konenimi                      (removed)
Alusta                        Linux (removed) 2.6.31.6-162.fc12.x86_64 #1 SMP Fri
                              Dec 4 00:06:26 EST 2009 x86_64 x86_64
Varoitusten määrä          1
Ensimmäinen                  ke  9. joulukuuta 2009 22.07.33
Viimeisin                     ke  9. joulukuuta 2009 22.07.33
Paikallinen tunniste          96597b33-fcd5-44a6-9daa-ba55f3eb3a12
Rivinumerot                   

Muokkaamattomat tarkastusvies 

node=(removed) type=AVC msg=audit(1260389253.529:25943): avc:  denied  { execmod } for  pid=15194 comm="darwinia.bin.x8" path="/usr/local/games/darwinia/lib/libSDL-1.2.so.0" dev=dm-0 ino=195511 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1260389253.529:25943): arch=40000003 syscall=125 success=no exit=-13 a0=7a7000 a1=62000 a2=5 a3=ffc57ad0 items=0 ppid=15188 pid=15194 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts2 ses=1 comm="darwinia.bin.x8" exe="/usr/local/games/darwinia/lib/darwinia.bin.x86" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-55.fc12,allow_execmod,darwinia.bin.x8,unconfined_t,lib_t,file,execmod
audit2allow suggests:

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

Comment 1 Daniel Walsh 2009-12-09 21:11:49 UTC
Execute the chcon command above.

ALso report this as a bug to darwinia to fix their libraries

Or better yet don't ship with their own version of the library.

Comment 2 Daniel Walsh 2009-12-23 17:44:05 UTC
Made default label.


Fixed in selinux-policy-3.6.32-64.fc12.noarch

Comment 3 Fedora Update System 2010-01-04 21:51:30 UTC
selinux-policy-3.6.32-66.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-66.fc12

Comment 4 Fedora Update System 2010-01-05 22:47:23 UTC
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0184

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