Bug 548717

Summary: SELinux is preventing /usr/local/mpeg123/bin/mpg123 from loading /usr/local/mpeg123/lib/libmpg123.so.0.22.1 which requires text relocation.
Product: [Fedora] Fedora Reporter: Mahmoud Payami <mahmoud_payami>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:5378d7a3d43bffee2d110a36797b8a6a56ee57c55f29d2525d24a6a5ceb8ed87
Fixed In Version: 3.6.32-66.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-05 22:59:43 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 Mahmoud Payami 2009-12-18 11:09:38 UTC
Summary:

SELinux is preventing /usr/local/mpeg123/bin/mpg123 from loading
/usr/local/mpeg123/lib/libmpg123.so.0.22.1 which requires text relocation.

Detailed Description:

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/local/mpeg123/lib/libmpg123.so.0.22.1'

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/local/mpeg123/lib/libmpg123.so.0.22.1 [ file
                              ]
Source                        mpg123
Source Path                   /usr/local/mpeg123/bin/mpg123
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-56.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.6-166.fc12.i686.PAE #1 SMP Wed
                              Dec 9 11:00:30 EST 2009 i686 i686
Alert Count                   2
First Seen                    Fri 18 Dec 2009 06:04:02 AM EST
Last Seen                     Fri 18 Dec 2009 06:06:19 AM EST
Local ID                      4c9b0488-b15a-4d54-a7cd-67c0e9768140
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1261134379.656:416): avc:  denied  { execmod } for  pid=15680 comm="mpg123" path="/usr/local/mpeg123/lib/libmpg123.so.0.22.1" dev=sda5 ino=282150 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(1261134379.656:416): arch=40000003 syscall=125 success=no exit=-13 a0=110000 a1=4a000 a2=5 a3=bfda21d0 items=0 ppid=1 pid=15680 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="mpg123" exe="/usr/local/mpeg123/bin/mpg123" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-56.fc12,allow_execmod,mpg123,unconfined_t,lib_t,file,execmod
audit2allow suggests:

#============= unconfined_t ==============
allow unconfined_t lib_t:file execmod;

Comment 1 Miroslav Grepl 2009-12-18 12:15:27 UTC
Execute the suggested chcon command.


Fix Command:

chcon -t textrel_shlib_t '/usr/local/mpeg123/lib/libmpg123.so.0.22.1'

Comment 2 Daniel Walsh 2009-12-18 13:55:17 UTC
Fixed in selinux-policy-3.6.32-60.fc12.noarch

Comment 3 Fedora Update System 2009-12-22 21:55:32 UTC
selinux-policy-3.6.32-63.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-63.fc12

Comment 4 Fedora Update System 2010-01-04 21:52:48 UTC
selinux-policy-3.6.32-66.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-66.fc12

Comment 5 Fedora Update System 2010-01-05 22:48:48 UTC
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0184

Comment 6 Fedora Update System 2010-01-05 22:57:17 UTC
selinux-policy-3.6.32-63.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2010-01-08 20:03:30 UTC
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.