Bug 1143

Summary: SELinux is preventing /usr/bin/MP4Box from loading /usr/lib/libgpac.so.0.4.6-DEV which requires text relocation.
Product: Fedora Reporter: Mads Villadsen <maxx>
Component: gpacAssignee: Nicolas Chauvet <kwizart>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P5    
Version: 12   
Hardware: All   
OS: GNU/Linux   
namespace:

Description Mads Villadsen 2010-04-01 14:17:28 CEST
[maxx@siamese ~]$ rpm -qa|grep gpac
gpac-libs-0.4.6-0.4.cvs20090919.fc12.i686
gpac-0.4.6-0.4.cvs20090919.fc12.i686


Summary:

SELinux is preventing /usr/bin/MP4Box from loading /usr/lib/libgpac.so.0.4.6-DEV
which requires text relocation.

Detailed Description:

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/lib/libgpac.so.0.4.6-DEV'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/lib/libgpac.so.0.4.6-DEV [ file ]
Source                        MP4Box
Source Path                   /usr/bin/MP4Box
Port                          <Unknown>
Host                          siamese
Source RPM Packages           gpac-0.4.6-0.4.cvs20090919.fc12
Target RPM Packages           gpac-libs-0.4.6-0.4.cvs20090919.fc12
Policy RPM                    selinux-policy-3.6.32-106.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     siamese
Platform                      Linux siamese 2.6.32.10-90.fc12.i686.PAE #1 SMP
                              Tue Mar 23 10:04:28 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Thu 01 Apr 2010 12:08:01 PM CEST
Last Seen                     Thu 01 Apr 2010 12:08:01 PM CEST
Local ID                      c0e3a919-84d3-46b6-92bd-bf1c4fbb5697
Line Numbers                  

Raw Audit Messages            

node=siamese type=AVC msg=audit(1270116481.112:38): avc:  denied  { execmod } for  pid=6858 comm="MP4Box" path="/usr/lib/libgpac.so.0.4.6-DEV" dev=dm-0 ino=6975 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=siamese type=SYSCALL msg=audit(1270116481.112:38): arch=40000003 syscall=125 success=no exit=-13 a0=5220000 a1=464000 a2=5 a3=bf88cca0 items=0 ppid=6836 pid=6858 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="MP4Box" exe="/usr/bin/MP4Box" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)
Comment 1 Nicolas Chauvet 2010-04-29 00:16:02 CEST
Sorry, I failed to look into this problem until now.
The x86_64 library isn't affected by the problem, so I guess it might be because it was not built with -fPIC on x86_32 (Need to be checked).
Comment 2 Nicolas Chauvet 2010-06-06 18:44:17 CEST
Thx for your report,
This seems fixed in gpac-0.4.6-0.8cvs20100527.fc13 currently in rpmfusion-free-updates-testing