Bug 558059

Summary: SELinux is preventing /opt/real/RealPlayer/realplay.bin from loading /opt/real/RealPlayer/plugins/oggfformat.so which requires text relocation.
Product: [Fedora] Fedora Reporter: gpvprasad
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, gpvprasad, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:6130e08ebdc0904ea17bce191650be1d421756e7c6d0ec6d250949dae29f8406
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-25 12:04:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description gpvprasad 2010-01-23 11:55:09 UTC
Summary:

SELinux is preventing /opt/real/RealPlayer/realplay.bin from loading
/opt/real/RealPlayer/plugins/oggfformat.so which requires text relocation.

Detailed Description:

The realplay.bin application attempted to load
/opt/real/RealPlayer/plugins/oggfformat.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
/opt/real/RealPlayer/plugins/oggfformat.so to use relocation as a workaround,
until the library is fixed. Please file a bug report.

Allowing Access:

If you trust /opt/real/RealPlayer/plugins/oggfformat.so to run correctly, you
can change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t
'/opt/real/RealPlayer/plugins/oggfformat.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
'/opt/real/RealPlayer/plugins/oggfformat.so'"

Fix Command:

chcon -t textrel_shlib_t '/opt/real/RealPlayer/plugins/oggfformat.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_execmem_t:s0-
                              s0:c0.c1023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /opt/real/RealPlayer/plugins/oggfformat.so [ file
                              ]
Source                        realplay.bin
Source Path                   /opt/real/RealPlayer/realplay.bin
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-66.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7
                              21:25:57 EST 2009 i686 i686
Alert Count                   11
First Seen                    Fri 15 Jan 2010 09:20:09 PM IST
Last Seen                     Sun 17 Jan 2010 08:02:55 PM IST
Local ID                      75007ca5-1792-4ecc-a047-1fc73d1c626e
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1263738775.960:45): avc:  denied  { execmod } for  pid=4398 comm="realplay.bin" path="/opt/real/RealPlayer/plugins/oggfformat.so" dev=dm-0 ino=147848 scontext=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1263738775.960:45): arch=40000003 syscall=125 success=no exit=-13 a0=55c000 a1=23000 a2=5 a3=bf89a450 items=0 ppid=4392 pid=4398 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="realplay.bin" exe="/opt/real/RealPlayer/realplay.bin" subj=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-66.fc12,allow_execmod,realplay.bin,unconfined_execmem_t,lib_t,file,execmod
audit2allow suggests:

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

allow unconfined_execmem_t lib_t:file execmod;

Comment 1 Miroslav Grepl 2010-01-25 12:04:54 UTC
Fix Command:

chcon -t textrel_shlib_t '/opt/real/RealPlayer/plugins/oggfformat.so'

*** This bug has been marked as a duplicate of bug 558049 ***