Bug 552708 - SELinux is preventing /usr/bin/totem from loading /usr/local/lib/codecs/drv3.so.6.0 which requires text relocation.
Summary: SELinux is preventing /usr/bin/totem from loading /usr/local/lib/codecs/drv3....
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:8554c013b08...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-05 22:11 UTC by Chris Campbell
Modified: 2010-01-19 19:41 UTC (History)
3 users (show)

Fixed In Version: 3.6.32-69.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-19 19:41:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Chris Campbell 2010-01-05 22:11:11 UTC
Summary:

SELinux is preventing /usr/bin/totem from loading
/usr/local/lib/codecs/drv3.so.6.0 which requires text relocation.

Detailed Description:

The totem application attempted to load /usr/local/lib/codecs/drv3.so.6.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/lib/codecs/drv3.so.6.0 to use relocation as a workaround, until the
library is fixed. Please file a bug report.

Allowing Access:

If you trust /usr/local/lib/codecs/drv3.so.6.0 to run correctly, you can change
the file context to textrel_shlib_t. "chcon -t textrel_shlib_t
'/usr/local/lib/codecs/drv3.so.6.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/lib/codecs/drv3.so.6.0'"

Fix Command:

chcon -t textrel_shlib_t '/usr/local/lib/codecs/drv3.so.6.0'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:object_r:lib_t:s0
Target Objects                /usr/local/lib/codecs/drv3.so.6.0 [ file ]
Source                        totem
Source Path                   /usr/bin/totem
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           totem-2.28.4-1.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-59.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.9-174.fc12.i686 #1 SMP
                              Mon Dec 21 06:24:20 UTC 2009 i686 i686
Alert Count                   4
First Seen                    Tue 05 Jan 2010 05:08:32 PM EST
Last Seen                     Tue 05 Jan 2010 05:08:32 PM EST
Local ID                      f4602e5e-d9fd-4d5c-a8d8-096423507751
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1262729312.745:27674): avc:  denied  { execmod } for  pid=2195 comm="totem" path="/usr/local/lib/codecs/drv3.so.6.0" dev=dm-0 ino=263349 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1262729312.745:27674): arch=40000003 syscall=125 success=no exit=-13 a0=1c05000 a1=40000 a2=5 a3=b4e1cde0 items=0 ppid=1 pid=2195 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="totem" exe="/usr/bin/totem" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-59.fc12,allow_execmod,totem,unconfined_t,lib_t,file,execmod
audit2allow suggests:
audit2allow is not installed.

Comment 1 Chris Campbell 2010-01-05 22:12:43 UTC
I inserted a DVD movie ('Taken') into my laptop's drive, and instead of getting Movie Player playing the movie, I got this SELinux bug.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Daniel Walsh 2010-01-06 13:52:59 UTC
Execute the chcon command in the alert.  You might want to actually just run

chcon -t textrel_shlib_t /usr/local/lib/codecs/*so*

Miroslav, I think we ought to make this the standard label.

Comment 3 Miroslav Grepl 2010-01-06 14:01:30 UTC
Ok, added to selinux-policy-3.6.32-67.fc12.noarch

Comment 4 Chris Campbell 2010-01-06 22:39:30 UTC
Great, to be honest, I actually already ran the command and watched the movie. :)
I just wanted to have the original issue recorded. The two command snippets recommended by the alert fixed the issue.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 5 Fedora Update System 2010-01-12 23:27:45 UTC
selinux-policy-3.6.32-69.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-0362

Comment 6 Chris Campbell 2010-01-14 00:16:54 UTC
Performed the command from Comment #5. Worked. Relabled system. Rebooted system. Inserted DVD and no errors. Good to go. Also provided feedback in FEDORA-2010-0362



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 7 Fedora Update System 2010-01-19 19:40:35 UTC
selinux-policy-3.6.32-69.fc12 has been pushed to the Fedora 12 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.