Bug 652992 - SELinux is preventing /home/martin/google-earth/googleearth-bin from loading /home/martin/google-earth/libIGGfx.so which requires text relocation.
Summary: SELinux is preventing /home/martin/google-earth/googleearth-bin from loading ...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:551a50e300d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-14 01:51 UTC by Martin Gradwell
Modified: 2010-11-15 11:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-15 11:47:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Martin Gradwell 2010-11-14 01:51:52 UTC
Summary:

SELinux is preventing /home/martin/google-earth/googleearth-bin from loading
/home/martin/google-earth/libIGGfx.so which requires text relocation.

Detailed Description:

The googleearth-bin application attempted to load
/home/martin/google-earth/libIGGfx.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://www.akkadia.org/drepper/selinux-mem.html) web page explains how to
remove this requirement. You can configure SELinux temporarily to allow
/home/martin/google-earth/libIGGfx.so to use relocation as a workaround, until
the library is fixed. Please file a bug report.

Allowing Access:

If you trust /home/martin/google-earth/libIGGfx.so to run correctly, you can
change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t
'/home/martin/google-earth/libIGGfx.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
'/home/martin/google-earth/libIGGfx.so'"

Fix Command:

chcon -t textrel_shlib_t '/home/martin/google-earth/libIGGfx.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_execmem_t:s0-
                              s0:c0.c1023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/martin/google-earth/libIGGfx.so [ file ]
Source                        googleearth-bin
Source Path                   /home/martin/google-earth/googleearth-bin
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-69.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.34.7-61.fc13.i686
                              #1 SMP Tue Oct 19 04:42:47 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Sun 14 Nov 2010 01:32:46 AM GMT
Last Seen                     Sun 14 Nov 2010 01:32:46 AM GMT
Local ID                      68af1f1a-10d1-4fb5-bb2b-03db1a1c439e
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1289698366.7:67434): avc:  denied  { execmod } for  pid=6436 comm="googleearth-bin" path="/home/martin/google-earth/libIGGfx.so" dev=dm-0 ino=1193035 scontext=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1289698366.7:67434): arch=40000003 syscall=125 success=no exit=-13 a0=19ed000 a1=370000 a2=5 a3=bfa58de0 items=0 ppid=6286 pid=6436 auid=500 uid=500 gid=501 euid=500 suid=500 fsuid=500 egid=501 sgid=501 fsgid=501 tty=pts1 ses=1 comm="googleearth-bin" exe="/home/martin/google-earth/googleearth-bin" subj=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,googleearth-bin,unconfined_execmem_t,user_home_t,file,execmod
audit2allow suggests:

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

allow unconfined_execmem_t user_home_t:file execmod;

Comment 1 Martin Gradwell 2010-11-14 02:00:55 UTC
I realise that filing here might not be appropriate, given that google-earth was obtained from Google and not from Red Hat/Fedora. However I submitted this bug report because the message that popped up said "please file a bug report" and I always try to comply with any reasonable request. Also, I hope that maybe you can help with the problem. Google Earth used to work but it doesn't work now, and downloading a fresh copy hasn't solved the problem. It fails on startup, generating the above errors.

Comment 2 Martin Gradwell 2010-11-14 02:43:15 UTC
P.S. When I change the file context for libIGGfx.so as the message suggests and then run I get a similar set of messages for libsgutil.so
then librender.so
then libmoduleframework.so
then libgeobaseutils.so
libcommon_webbrowser.so
libcommon_platform.so
libcommon.so
libbase.so
libauth.so
libQtGui.so.4
libgoogleearth_free.so
libevll.so
and many others

Comment 3 Miroslav Grepl 2010-11-15 11:47:58 UTC
Turn off the check if you want to execute home content.

# setsebool -P allow_execmod 1


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