Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 595888 - SELinux is preventing /home/dodoedo/Stiahnuté/firefox/firefox-bin from loading /home/dodoedo/Stiahnuté/firefox/libxul.so which requires text relocation.
SELinux is preventing /home/dodoedo/Stiahnuté/firefox/firefox-bin from loadin...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
13
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:6e96bbcf108...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-25 16:52 EDT by edo
Modified: 2011-01-28 13:01 EST (History)
33 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-26 03:22:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description edo 2010-05-25 16:52:22 EDT
Summary:

SELinux is preventing /home/dodoedo/Stiahnuté/firefox/firefox-bin from loading
/home/dodoedo/Stiahnuté/firefox/libxul.so which requires text relocation.

Detailed Description:

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/home/dodoedo/Stiahnuté/firefox/libxul.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/dodoedo/Stiahnuté/firefox/libxul.so [ file
                              ]
Source                        firefox-bin
Source Path                   /home/dodoedo/Stiahnuté/firefox/firefox-bin
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-15.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.33.4-95.fc13.i686.PAE #1 SMP Thu May 13
                              05:38:26 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Ut 25. máj 2010, 22:51:14 CEST
Last Seen                     Ut 25. máj 2010, 22:51:14 CEST
Local ID                      06710417-b9b2-48a0-a990-70baa823f961
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1274820674.177:25658): avc:  denied  { execmod } for  pid=2917 comm="firefox-bin" path=2F686F6D652F646F646F65646F2F53746961686E7574C3A92F66697265666F782F6C696278756C2E736F dev=dm-0 ino=272999 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1274820674.177:25658): arch=40000003 syscall=125 success=no exit=-13 a0=e98000 a1=e12000 a2=5 a3=bfa87cd0 items=0 ppid=2913 pid=2917 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=2F686F6D652F646F646F65646F2F53746961686E7574C3A92F66697265666F782F66697265666F782D62696E subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



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

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

allow unconfined_t user_home_t:file execmod;
Comment 1 Miroslav Grepl 2010-05-26 03:22:36 EDT
Please either execute the chcon command in the alert 

# chcon -t textrel_shlib_t '/home/dodoedo/Stiahnuté/firefox/libxul.so'

or turn this check off.

# setsebool -P allow_execmod 1
Comment 2 Bruce Brackbill 2010-08-11 15:56:22 EDT
I'm also getting this warning:
"SELinux is preventing /home/bruce/Desktop/firefox/firefox-bin from loading /home/bruce/Desktop/firefox/libxul.so which requires text relocation."

Is Firefox really running from "/home/bruce/Desktop/firefox/firefox-bin"? I'm not running firefox from that location, other than lauching it from a panel Launcher on the Desktop. As far a I can see, neither "/home/bruce/Desktop/firefox/firefox-bin" or "/home/bruce/Desktop/firefox/libxul.so" exist.

[bruce@localhost ~]$ ps aux | grep firefox
bruce     2379  0.0  0.1   5096  1192 ?        S    11:20   0:00 /bin/sh /usr/lib/firefox-3.6/run-mozilla.sh /usr/lib/firefox-3.6/firefox
bruce     2396  7.1 14.1 407632 90108 ?        Sl   11:20   5:43 /usr/lib/firefox-3.6/firefox

[bruce@localhost ~]$ which firefox
/usr/bin/firefox
Comment 3 Rafi Baig 2010-11-26 14:39:03 EST
it's a pain - same thing happened in the previous beta (6) - sort it out guys! I don't like putting selinux in permissive, kind of defeats the purpose of it.


Summary:

SELinux is preventing /home/Rafi/firefox/firefox-bin from loading
/home/Rafi/firefox/libxul.so which requires text relocation.

Detailed Description:

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

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/home/Rafi/firefox/libxul.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/Rafi/firefox/libxul.so [ file ]
Source                        firefox-bin
Source Path                   /home/Rafi/firefox/firefox-bin
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-73.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   allow_execmod
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain
                              2.6.34.7-61.fc13.i686.PAE #1 SMP Tue Oct 19
                              04:24:06 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Fri 26 Nov 2010 19:22:00 GMT
Last Seen                     Fri 26 Nov 2010 19:22:00 GMT
Local ID                      c3d5ef7f-435d-4206-b4f5-d489bdfe5f36
Line Numbers                  

Raw Audit Messages            

node=localhost.localdomain type=AVC msg=audit(1290799320.670:20828): avc:  denied  { execmod } for  pid=2183 comm="firefox-bin" path="/home/Rafi/firefox/libxul.so" dev=dm-2 ino=18 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file

node=localhost.localdomain type=SYSCALL msg=audit(1290799320.670:20828): arch=40000003 syscall=125 success=yes exit=0 a0=a45000 a1=136a000 a2=5 a3=bfcd2eb0 items=0 ppid=1 pid=2183 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="/home/Rafi/firefox/firefox-bin" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

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