Bug 743353 - SELINUX prevent plugin-config, npviewer.bin to excute libflashplayer.so
Summary: SELINUX prevent plugin-config, npviewer.bin to excute libflashplayer.so
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-04 16:59 UTC by JCHuynh
Modified: 2011-10-04 20:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-04 20:37:51 UTC
Type: ---


Attachments (Terms of Use)

Description JCHuynh 2011-10-04 16:59:41 UTC
Description of problem:
Using firefox + flash

Version-Release number of selected component (if applicable):
Firefox 7
Flash plugin 11

Details
SELinux is preventing /usr/lib64/nspluginwrapper/plugin-config from execute access on the file /usr/lib64/mozilla/plugins/libflashplayer.so.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/usr/lib64/mozilla/plugins/libflashplayer.so default label should be lib_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /usr/lib64/mozilla/plugins/libflashplayer.so

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that plugin-config should be allowed execute access on the libflashplayer.so file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep plugin-config /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:nsplugin_config_t:s0-s0:
                              c0.c1023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /usr/lib64/mozilla/plugins/libflashplayer.so [
                              file ]
Source                        plugin-config
Source Path                   /usr/lib64/nspluginwrapper/plugin-config
Port                          <Unknown>
Host                          jc1da-fc16-beta
Source RPM Packages           nspluginwrapper-1.4.4-1.fc16
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-32.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     jc1da-fc16-beta
Platform                      Linux jc1da-fc16-beta
                              3.1.0-0.rc6.git0.3.fc16.x86_64 #1 SMP Fri Sep 16
                              12:26:22 UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Tue 04 Oct 2011 11:56:27 PM ICT
Last Seen                     Tue 04 Oct 2011 11:56:27 PM ICT
Local ID                      c7e6ff8f-cde7-4c7d-a970-fd9d06966143

Raw Audit Messages
type=AVC msg=audit(1317747387.212:237): avc:  denied  { execute } for  pid=1969 comm="plugin-config" path="/usr/lib64/mozilla/plugins/libflashplayer.so" dev=dm-1 ino=786952 scontext=unconfined_u:unconfined_r:nsplugin_config_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1317747387.212:237): arch=x86_64 syscall=mmap success=no exit=EACCES a0=0 a1=14f09c8 a2=5 a3=802 items=0 ppid=1967 pid=1969 auid=1000 uid=1000 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=6 comm=plugin-config exe=/usr/lib64/nspluginwrapper/plugin-config subj=unconfined_u:unconfined_r:nsplugin_config_t:s0-s0:c0.c1023 key=(null)

Hash: plugin-config,nsplugin_config_t,user_home_t,file,execute

audit2allow

#============= nsplugin_config_t ==============
allow nsplugin_config_t user_home_t:file execute;

audit2allow -R

#============= nsplugin_config_t ==============
allow nsplugin_config_t user_home_t:file execute;

Comment 1 JCHuynh 2011-10-04 17:02:18 UTC
Details with npviewer.bin
##################################################################################
SELinux is preventing /usr/lib64/nspluginwrapper/npviewer.bin from execute access on the file /usr/lib64/mozilla/plugins/libflashplayer.so.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/usr/lib64/mozilla/plugins/libflashplayer.so default label should be lib_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /usr/lib64/mozilla/plugins/libflashplayer.so

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that npviewer.bin should be allowed execute access on the libflashplayer.so file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep npviewer.bin /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:nsplugin_t:s0-s0:c0.c102
                              3
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /usr/lib64/mozilla/plugins/libflashplayer.so [
                              file ]
Source                        npviewer.bin
Source Path                   /usr/lib64/nspluginwrapper/npviewer.bin
Port                          <Unknown>
Host                          jc1da-fc16-beta
Source RPM Packages           nspluginwrapper-1.4.4-1.fc16
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-32.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     jc1da-fc16-beta
Platform                      Linux jc1da-fc16-beta
                              3.1.0-0.rc6.git0.3.fc16.x86_64 #1 SMP Fri Sep 16
                              12:26:22 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Tue 04 Oct 2011 11:56:27 PM ICT
Last Seen                     Tue 04 Oct 2011 11:56:27 PM ICT
Local ID                      3c15d4f1-1422-400b-9cb8-9c6b829b055c

Raw Audit Messages
type=AVC msg=audit(1317747387.173:235): avc:  denied  { execute } for  pid=1970 comm="npviewer.bin" path="/usr/lib64/mozilla/plugins/libflashplayer.so" dev=dm-1 ino=786952 scontext=unconfined_u:unconfined_r:nsplugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1317747387.173:235): arch=x86_64 syscall=mmap success=no exit=EACCES a0=0 a1=14f09c8 a2=5 a3=802 items=0 ppid=1969 pid=1970 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=6 comm=npviewer.bin exe=/usr/lib64/nspluginwrapper/npviewer.bin subj=unconfined_u:unconfined_r:nsplugin_t:s0-s0:c0.c1023 key=(null)

Hash: npviewer.bin,nsplugin_t,user_home_t,file,execute

audit2allow

#============= nsplugin_t ==============
allow nsplugin_t user_home_t:file execute;

audit2allow -R

#============= nsplugin_t ==============
allow nsplugin_t user_home_t:file execute;

################################################################################

Comment 2 Daniel Walsh 2011-10-04 20:37:51 UTC
The alert tells you what to do.  You installed a file into your homedir and then mv'd it to a system area, run restorecon on it and the problem will be fixed.


Note You need to log in before you can comment on or make changes to this bug.