Bug 985520

Summary: SELinux is preventing /usr/lib64/xulrunner/plugin-container from 'execute_no_trans' accesses on the file /usr/java/jdk1.7.0_25/jre/bin/java.
Product: [Fedora] Fedora Reporter: randyhunt1981
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b3d952fa6c6503ba522113d2ac4d802685c3fd8f55a9ba435cee55e9fbd57442
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-18 17:36:31 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 randyhunt1981 2013-07-17 16:36:17 UTC
Description of problem:
Firefox hangs any time I access a page that uses java applets
example: http://www.java.com/en/download/installed.jsp
Took me many hours of searching to find out that this was SELinux blocking java plugin. This should not be something that takes hours to troubleshoot. Java plugin should be allowed for firefox. It works fine in Chrome.
SELinux is preventing /usr/lib64/xulrunner/plugin-container from 'execute_no_trans' accesses on the file /usr/java/jdk1.7.0_25/jre/bin/java.

*****  Plugin restorecon (57.3 confidence) suggests  *************************

If you want to fix the label. 
/usr/java/jdk1.7.0_25/jre/bin/java default label should be bin_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /usr/java/jdk1.7.0_25/jre/bin/java

*****  Plugin mozplugger (43.1 confidence) suggests  *************************

If you want to use the plugin package
Then you must turn off SELinux controls on the Firefox plugins.
Do
# setsebool unconfined_mozilla_plugin_transition 0

*****  Plugin catchall (1.06 confidence) suggests  ***************************

If you believe that plugin-container should be allowed execute_no_trans access on the java 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-containe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
                              0.c1023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /usr/java/jdk1.7.0_25/jre/bin/java [ file ]
Source                        plugin-containe
Source Path                   /usr/lib64/xulrunner/plugin-container
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xulrunner-22.0-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.6-200.fc18.x86_64 #1 SMP Thu
                              Jun 13 18:56:55 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-07-17 10:29:01 MDT
Last Seen                     2013-07-17 10:29:55 MDT
Local ID                      3d80c626-e49f-4488-8eed-64332e679791

Raw Audit Messages
type=AVC msg=audit(1374078595.553:4134): avc:  denied  { execute_no_trans } for  pid=13342 comm="plugin-containe" path="/usr/java/jdk1.7.0_25/jre/bin/java" dev="dm-1" ino=1459018 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1374078595.553:4134): arch=x86_64 syscall=execve success=no exit=EACCES a0=7fee42aff940 a1=7fee43a18420 a2=7fee43a1b400 a3=20 items=0 ppid=13275 pid=13342 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=2 tty=(none) comm=plugin-containe exe=/usr/lib64/xulrunner/plugin-container subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: plugin-containe,mozilla_plugin_t,user_home_t,file,execute_no_trans

audit2allow

#============= mozilla_plugin_t ==============
allow mozilla_plugin_t user_home_t:file execute_no_trans;

audit2allow -R
require {
	type user_home_t;
	type mozilla_plugin_t;
	class file execute_no_trans;
}

#============= mozilla_plugin_t ==============
allow mozilla_plugin_t user_home_t:file execute_no_trans;


Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.6-200.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-07-18 17:36:31 UTC
Please execute

# restorecon -R -v /usr/java/jdk1.7.0_25/jre/bin