Bug 642137

Summary: SELinux is preventing /usr/lib/nspluginwrapper/npviewer.bin from loading /opt/google/talkplugin/libnpgoogletalk.so which requires text relocation.
Product: [Fedora] Fedora Reporter: cornel panceac <cpanceac>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: bugzilla.redhat.com, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:4e8ea1498acaecf7b9a5dc0d48be6ea806089f0331e8f3e16a19eb42c69d1b8e
Fixed In Version: selinux-policy-3.9.7-1.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-15 12:41:27 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 cornel panceac 2010-10-12 07:04:10 UTC
Summary:

SELinux is preventing /usr/lib/nspluginwrapper/npviewer.bin from loading
/opt/google/talkplugin/libnpgoogletalk.so which requires text relocation.

Detailed Description:

The npviewer.bin application attempted to load
/opt/google/talkplugin/libnpgoogletalk.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://www.akkadia.org/drepper/selinux-mem.html) web page explains how to
remove this requirement. You can configure SELinux temporarily to allow
/opt/google/talkplugin/libnpgoogletalk.so to use relocation as a workaround,
until the library is fixed. Please file a bug report.

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/opt/google/talkplugin/libnpgoogletalk.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:nsplugin_t:s0-s0:c0.c102
                              3
Target Context                system_u:object_r:bin_t:s0
Target Objects                /opt/google/talkplugin/libnpgoogletalk.so [ file ]
Source                        npviewer.bin
Source Path                   /usr/lib/nspluginwrapper/npviewer.bin
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nspluginwrapper-1.3.0-14.fc14
Target RPM Packages           google-talkplugin-1.5.1.0-1
Policy RPM                    selinux-policy-3.9.5-10.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.4-28.fc14.i686.PAE #1
                              SMP Wed Sep 15 01:57:00 UTC 2010 i686 i686
Alert Count                   10
First Seen                    Mon 11 Oct 2010 03:55:10 PM EEST
Last Seen                     Mon 11 Oct 2010 04:14:15 PM EEST
Local ID                      ae646a34-30d0-44f4-9430-d1385b432b65
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1286802855.424:47): avc:  denied  { execmod } for  pid=9716 comm="npviewer.bin" path="/opt/google/talkplugin/libnpgoogletalk.so" dev=sda5 ino=261679 scontext=unconfined_u:unconfined_r:nsplugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:bin_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1286802855.424:47): arch=40000003 syscall=125 success=no exit=-13 a0=c68000 a1=27000 a2=5 a3=bfe3e720 items=0 ppid=3332 pid=9716 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="npviewer.bin" exe="/usr/lib/nspluginwrapper/npviewer.bin" subj=unconfined_u:unconfined_r:nsplugin_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,npviewer.bin,nsplugin_t,bin_t,file,execmod
audit2allow suggests:

#============= nsplugin_t ==============
allow nsplugin_t bin_t:file execmod;

Comment 1 Daniel Walsh 2010-10-12 14:04:14 UTC
Execute the chcon in the alert.

Fixed in selinux-policy-3.9.6-3.fc14

Comment 2 Fedora Update System 2010-10-13 16:13:19 UTC
selinux-policy-3.9.7-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-1.fc14

Comment 3 Fedora Update System 2010-10-13 21:20:56 UTC
selinux-policy-3.9.7-1.fc14 has been pushed to the Fedora 14 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: https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-1.fc14

Comment 4 Fedora Update System 2010-10-15 12:40:52 UTC
selinux-policy-3.9.7-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.