Bug 624206 - SELinux is preventing /usr/lib/firefox-4.0/firefox-bin from loading /usr/lib/firefox-4.0/libxul.so which requires text relocation.
Summary: SELinux is preventing /usr/lib/firefox-4.0/firefox-bin from loading /usr/lib/...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:f906daa7f09...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-14 12:16 UTC by dnyanesh
Modified: 2011-10-25 22:17 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-16 13:08:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description dnyanesh 2010-08-14 12:16:54 UTC
Summary:

SELinux is preventing /usr/lib/firefox-4.0/firefox-bin from loading
/usr/lib/firefox-4.0/libxul.so which requires text relocation.

Detailed Description:

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/lib/firefox-4.0/libxul.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/lib/firefox-4.0/libxul.so [ file ]
Source                        firefox-bin
Source Path                   /usr/lib/firefox-4.0/firefox-bin
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           firefox4-4.0-0.2.beta2.fc13.remi
Target RPM Packages           firefox4-4.0-0.2.beta2.fc13.remi
Policy RPM                    selinux-policy-3.7.19-44.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.6-147.2.4.fc13.i686.PAE #1
                              SMP Fri Jul 23 17:21:06 UTC 2010 i686 i686
Alert Count                   3
First Seen                    Thu 12 Aug 2010 10:14:29 PM IST
Last Seen                     Thu 12 Aug 2010 10:15:36 PM IST
Local ID                      13f2f5f9-4ea2-4656-b566-e0505b20f220
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1281631536.111:28344): avc:  denied  { execmod } for  pid=2680 comm="firefox-bin" path="/usr/lib/firefox-4.0/libxul.so" dev=dm-0 ino=1046807 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(1281631536.111:28344): arch=40000003 syscall=125 success=no exit=-13 a0=f42000 a1=12c6000 a2=5 a3=bfa25560 items=0 ppid=1 pid=2680 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="firefox-bin" exe="/usr/lib/firefox-4.0/firefox-bin" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,firefox-bin,unconfined_t,lib_t,file,execmod
audit2allow suggests:

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

allow unconfined_t lib_t:file execmod;

Comment 1 Miroslav Grepl 2010-08-16 13:08:28 UTC
/usr/lib/firefox-4.0/libxul.so  is built incorrectly.

Either use the chcon command mentioned in the alert or turn off the check
altogether.


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