Bug 797497

Summary: SELinux is preventing /usr/lib/nspluginwrapper/plugin-config from loading /usr/lib/flash-plugin/libflashplayer.so which requires text relocation.
Product: [Fedora] Fedora Reporter: Bishnu Marasini <bismar.blog>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED WONTFIX 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:b51365a1698b58dd7788279f064529313836f088d413081f0fde3bc8a4ac1cb2
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-27 11:29:20 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 Bishnu Marasini 2012-02-26 07:26:22 UTC
Summary:

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

Detailed Description:

The plugin-config 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_t:s0-s0:c0.c1
                              023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/lib/flash-plugin/libflashplayer.so [ file ]
Source                        xulrunner-bin
Source Path                   /usr/lib/xulrunner-2/xulrunner-bin
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nspluginwrapper-1.3.0-10.fc12
Target RPM Packages           flash-plugin-11.1.102.55-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 lab404.localdomain
                              2.6.32.26-175.fc12.i686.PAE #1 SMP Wed Dec 1
                              21:45:50 UTC 2010 i686 i686
Alert Count                   34
First Seen                    Thu 23 Feb 2012 10:25:15 PM PKT
Last Seen                     Sat 25 Feb 2012 10:15:10 PM PKT
Local ID                      521839a9-cd77-4d73-aa90-f9b1490679e6
Line Numbers                  

Raw Audit Messages            

node=lab404.localdomain type=AVC msg=audit(1330190110.957:138): avc:  denied  { execmod } for  pid=8899 comm="plugin-config" path="/usr/lib/flash-plugin/libflashplayer.so" dev=sda3 ino=526258 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=lab404.localdomain type=SYSCALL msg=audit(1330190110.957:138): arch=40000003 syscall=125 success=no exit=-13 a0=dd5000 a1=fc8000 a2=5 a3=bf86e2d0 items=0 ppid=8897 pid=8899 auid=504 uid=504 gid=504 euid=0 suid=0 fsuid=0 egid=504 sgid=504 fsgid=504 tty=(none) ses=1 comm="plugin-config" exe="/usr/lib/nspluginwrapper/plugin-config" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,xulrunner-bin,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 2012-02-27 11:29:20 UTC
Please update to a newer version of Fedora which is supported.