Bug 750343

Summary: SELinux is preventing /usr/bin/nspluginscan from loading /usr/lib/flash-plugin/libflashplayer.so which requires text relocation.
Product: [Fedora] Fedora Reporter: Frank Thrum <frank.thrum>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 12CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:784b296ba2c99510f778344bfe084862aef6488b7fdd416f6221ef70a07faf9e
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-31 19:08:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Frank Thrum 2011-10-31 18:57:59 UTC
Summary:

SELinux is preventing /usr/bin/nspluginscan from loading
/usr/lib/flash-plugin/libflashplayer.so which requires text relocation.

Detailed Description:

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

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/lib/flash-plugin/libflashplayer.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_execmem_t:s0-
                              s0:c0.c1023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/lib/flash-plugin/libflashplayer.so [ file ]
Source                        nspluginscan
Source Path                   /usr/bin/nspluginscan
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           kdebase-4.4.5-1.fc12
Target RPM Packages           flash-plugin-11.0.1.152-release
Policy RPM                    selinux-policy-3.6.32-127.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32.26-175.fc12.i686.PAE #1 SMP
                              Wed Dec 1 21:45:50 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Sat 29 Oct 2011 10:46:39 AM CEST
Last Seen                     Sat 29 Oct 2011 10:46:39 AM CEST
Local ID                      7a1e9062-f7d1-423e-b330-65f48ee35216
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1319877999.689:13): avc:  denied  { execmod } for  pid=2095 comm="nspluginscan" path="/usr/lib/flash-plugin/libflashplayer.so" dev=sda3 ino=4712669 scontext=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1319877999.689:13): arch=40000003 syscall=125 success=no exit=-13 a0=2ae5000 a1=fc7000 a2=5 a3=bff83550 items=0 ppid=2094 pid=2095 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="nspluginscan" exe="/usr/bin/nspluginscan" subj=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,nspluginscan,unconfined_execmem_t,lib_t,file,execmod
audit2allow suggests:

#============= unconfined_execmem_t ==============
#!!!! This avc can be allowed using the boolean 'allow_execmod'

allow unconfined_execmem_t lib_t:file execmod;

Comment 1 Daniel Walsh 2011-10-31 19:08:33 UTC
Please install a supported OS,