Bug 671223 - SELinux is preventing /usr/lib/firefox-3.6/firefox from loading /home/walt/.mozilla/firefox/5q01kurs.default/extensions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platform/Linux/components/ColorZilla.so which requires text relocation.
Summary: SELinux is preventing /usr/lib/firefox-3.6/firefox from loading /home/walt/.m...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:a0cd28d5847...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-20 19:10 UTC by Walt
Modified: 2011-03-17 18:48 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.7.19-89.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-17 18:48:50 UTC
Type: ---


Attachments (Terms of Use)

Description Walt 2011-01-20 19:10:25 UTC
Summary:

SELinux is preventing /usr/lib/firefox-3.6/firefox from loading
/home/walt/.mozilla/firefox/5q01kurs.default/extensions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platform/Linux/components/ColorZilla.so
which requires text relocation.

Detailed Description:

The firefox application attempted to load
/home/walt/.mozilla/firefox/5q01kurs.default/extensions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platform/Linux/components/ColorZilla.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/walt/.mozilla/firefox/5q01kurs.default/extensions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platform/Linux/components/ColorZilla.so
to use relocation as a workaround, until the library is fixed. Please file a bug
report.

Allowing Access:

If you trust
/home/walt/.mozilla/firefox/5q01kurs.default/extensions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platform/Linux/components/ColorZilla.so
to run correctly, you can change the file context to textrel_shlib_t. "chcon -t
textrel_shlib_t
'/home/walt/.mozilla/firefox/5q01kurs.default/extensions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platform/Linux/components/ColorZilla.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/walt/.mozilla/firefox/5q01kurs.default/extensions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platform/Linux/components/ColorZilla.so'"

Fix Command:

chcon -t textrel_shlib_t
'/home/walt/.mozilla/firefox/5q01kurs.default/extensions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platform/Linux/components/ColorZilla.so'

Additional Information:

Source Context                user_u:user_r:user_t:s0
Target Context                unconfined_u:object_r:mozilla_home_t:s0
Target Objects                /home/walt/.mozilla/firefox/5q01kurs.default/exten
                              sions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platf
                              orm/Linux/components/ColorZilla.so [ file ]
Source                        firefox
Source Path                   /usr/lib/firefox-3.6/firefox
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           firefox-3.6.13-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-76.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.34.7-66.fc13.i686 #1
                              SMP Wed Dec 15 07:40:25 UTC 2010 i686 i686
Alert Count                   10
First Seen                    Mon 03 Jan 2011 09:52:41 AM EST
Last Seen                     Sun 16 Jan 2011 09:55:43 PM EST
Local ID                      ddc75066-b211-4def-ab96-7fa70b9bbf78
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1295232943.395:105225): avc:  denied  { execmod } for  pid=6315 comm="firefox" path="/home/walt/.mozilla/firefox/5q01kurs.default/extensions/{6AC85730-7D0F-4de0-B3FA-21142DD85326}/platform/Linux/components/ColorZilla.so" dev=dm-0 ino=2098387 scontext=user_u:user_r:user_t:s0 tcontext=unconfined_u:object_r:mozilla_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1295232943.395:105225): arch=40000003 syscall=125 success=no exit=-13 a0=639000 a1=3000 a2=5 a3=bf979b50 items=0 ppid=6298 pid=6315 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="firefox" exe="/usr/lib/firefox-3.6/firefox" subj=user_u:user_r:user_t:s0 key=(null)



Hash String generated from  allow_execmod,firefox,user_t,mozilla_home_t,file,execmod
audit2allow suggests:

#============= user_t ==============
allow user_t mozilla_home_t:file execmod;

Comment 1 Daniel Walsh 2011-01-20 20:05:02 UTC
If you are going to download untrusted content to your homedir and allow it to execmod 

Miroslav add

tunable_policy(`allow_execmod',`
	userdom_execmod_user_home_files(staff_usertype)
')

and

tunable_policy(`allow_execmod',`
	userdom_execmod_user_home_files(user_usertype)
')

To F13/F14 policy staff.te and unprivuser.te

Walt for now you can mark this libary as textrel_shlib_t so it will work.  Otherwise you will have to set the allow_execmod boolean.

Comment 2 Miroslav Grepl 2011-01-27 13:39:43 UTC
Fixed in selinux-policy-3.7.19-87.fc13.

Comment 3 Fedora Update System 2011-02-04 10:31:20 UTC
selinux-policy-3.7.19-89.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-89.fc13

Comment 4 Fedora Update System 2011-02-04 19:48:28 UTC
selinux-policy-3.7.19-89.fc13 has been pushed to the Fedora 13 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: https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-89.fc13

Comment 5 Fedora Update System 2011-03-17 18:48:06 UTC
selinux-policy-3.7.19-89.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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