Bug 605916 - SELinux is preventing /usr/bin/mythfrontend from loading /usr/lib/mythtv/filters/libgreedyhdeint.so which requires text relocation.
Summary: SELinux is preventing /usr/bin/mythfrontend from loading /usr/lib/mythtv/filt...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy   
(Show other bugs)
Version: 13
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:3ac21809773...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-19 12:09 UTC by Richard Shaw
Modified: 2010-06-21 14:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-21 10:45:14 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 Richard Shaw 2010-06-19 12:09:55 UTC

SELinux is preventing /usr/bin/mythfrontend from loading
/usr/lib/mythtv/filters/libgreedyhdeint.so which requires text relocation.

Detailed Description:

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/lib/mythtv/filters/libgreedyhdeint.so'

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/lib/mythtv/filters/libgreedyhdeint.so [ file
Source                        mythfrontend
Source Path                   /usr/bin/mythfrontend
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mythtv-frontend-0.23-2.fc13
Target RPM Packages           mythtv-frontend-0.23-2.fc13
Policy RPM                    selinux-policy-3.7.19-23.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed)
                     #1 SMP Fri Jun 11
                              09:42:24 UTC 2010 i686 i686
Alert Count                   26
First Seen                    Fri 18 Jun 2010 04:00:21 PM CDT
Last Seen                     Fri 18 Jun 2010 06:16:30 PM CDT
Local ID                      8c98f560-03c1-41ae-a758-fa1afd2a4495
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1276902990.697:20466): avc:  denied  { execmod } for  pid=3080 comm="mythfrontend" path="/usr/lib/mythtv/filters/libgreedyhdeint.so" dev=dm-0 ino=123387 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(1276902990.697:20466): arch=40000003 syscall=125 success=no exit=-13 a0=c4d000 a1=4000 a2=5 a3=a9cfea80 items=0 ppid=2075 pid=3080 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="mythfrontend" exe="/usr/bin/mythfrontend" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  allow_execmod,mythfrontend,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-21 10:45:14 UTC
chcon -t textrel_shlib_t '/usr/lib/mythtv/filters/libgreedyhdeint.so'

will fix. To make this permanent

semanage fcontext -a -t textrel_shlib_t '/usr/lib/mythtv/filters/libgreedyhdeint.so'

Comment 2 Richard Shaw 2010-06-21 13:07:08 UTC
Yeah I saw the fix command, but I have couple of questions:

- Does the library require this access or does it need to be updated to not require this access?
- Why do I see this on my only i686 install of Fedora and Mythtv and not on any of my 3 x86_64 installs of Fedora/MythTV?
- If the library does require this label, do I also need to run the other command to prevent it from being changed back on a relabel?

Comment 3 Daniel Walsh 2010-06-21 14:37:28 UTC
Most likely the library is being built incorrectly.  Usually missing an -fPIC flag.

Not sure why it works on x86_64 versus i686.

semanage fcontext command makes it permanent.

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