Bug 605916 - SELinux is preventing /usr/bin/mythfrontend from loading /usr/lib/mythtv/filters/libgreedyhdeint.so which requires text relocation.
SELinux is preventing /usr/bin/mythfrontend from loading /usr/lib/mythtv/filt...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
13
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:3ac21809773...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-19 08:09 EDT by Richard Shaw
Modified: 2010-06-21 10:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-21 06:45:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard Shaw 2010-06-19 08:09:55 EDT
Summary:

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
'/usr/lib/mythtv/filters/libgreedyhdeint.so'"

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
                              023
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)
                              2.6.33.5-124.fc13.i686.PAE #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 06:45:14 EDT
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 09:07:08 EDT
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 10:37:28 EDT
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.