Bug 600761 - SELinux is preventing /usr/local/bin/mencoder from loading /usr/local/lib/libx264.so.94 which requires text relocation.
Summary: SELinux is preventing /usr/local/bin/mencoder from loading /usr/local/lib/lib...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy   
(Show other bugs)
Version: 12
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:6f59de24f8b...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-05 22:40 UTC by bugsvillecentral
Modified: 2010-06-07 07:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-07 07:26:38 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description bugsvillecentral 2010-06-05 22:40:12 UTC

SELinux is preventing /usr/local/bin/mencoder from loading
/usr/local/lib/libx264.so.94 which requires text relocation.

Detailed Description:

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/local/lib/libx264.so.94'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/local/lib/libx264.so.94 [ file ]
Source                        mencoder
Source Path                   /usr/local/bin/mencoder
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-113.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed)
                              #1 SMP Mon Apr 5 16:32:08 EDT 2010 i686 i686
Alert Count                   26
First Seen                    Mon 05 Apr 2010 17:34:40 BST
Last Seen                     Mon 10 May 2010 15:18:45 BST
Local ID                      ad2ab5cf-f060-4756-84b3-b23245b13aad
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1273501125.728:34): avc:  denied  { execmod } for  pid=10961 comm="mencoder" path="/usr/local/lib/libx264.so.94" dev=dm-0 ino=43562 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(1273501125.728:34): arch=40000003 syscall=125 success=no exit=-13 a0=606000 a1=d1000 a2=5 a3=bfbd0b20 items=0 ppid=2672 pid=10961 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts0 ses=1 comm="mencoder" exe="/usr/local/bin/mencoder" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  allow_execmod,mencoder,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-06-07 07:26:38 UTC
Fix Command:

chcon -t textrel_shlib_t '/usr/local/lib/libx264.so.94'

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