Bug 963143 - SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk- from 'create' accesses on the directory 10.
SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-05-15 04:55 EDT by Michal Nowak
Modified: 2013-06-07 02:56 EDT (History)
5 users (show)

See Also:
Fixed In Version: selinux-policy-3.11.1-95.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-05-21 04:39:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Nowak 2013-05-15 04:55:03 EDT
Description of problem:
Load Java Applet from https://www.mojebanka.cz/InternetBanking/?L=CS with Firefox 21.
SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk- from 'create' accesses on the directory 10.

*****  Plugin mozplugger (99.1 confidence) suggests  *************************

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

*****  Plugin catchall (1.81 confidence) suggests  ***************************

If you believe that java should be allowed create access on the 10 directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep java /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
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                10 [ dir ]
Source                        java
Source Path                   /usr/lib/jvm/java-1.7.0-openjdk-
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           java-1.7.0-openjdk-
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-92.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.8.11-200.fc18.x86_64 #1 SMP Wed
                              May 1 19:44:27 UTC 2013 x86_64 x86_64
Alert Count                   9
First Seen                    2013-05-15 10:52:27 CEST
Last Seen                     2013-05-15 10:52:30 CEST
Local ID                      88fc60c5-c906-411a-810d-f0a3e8da372d

Raw Audit Messages
type=AVC msg=audit(1368607950.749:453): avc:  denied  { create } for  pid=17098 comm="java" name="10" scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir

type=SYSCALL msg=audit(1368607950.749:453): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7fe5940068a0 a1=1ff a2=7fe668488e20 a3=1f items=0 ppid=16787 pid=17098 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=2 tty=(none) comm=java exe=/usr/lib/jvm/java-1.7.0-openjdk- subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: java,mozilla_plugin_t,user_home_t,dir,create


#============= mozilla_plugin_t ==============
allow mozilla_plugin_t user_home_t:dir create;

audit2allow -R
require {
	type mozilla_plugin_t;

#============= mozilla_plugin_t ==============

Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.11-200.fc18.x86_64
type:           libreport
Comment 1 Daniel Walsh 2013-05-16 13:34:06 EDT
Is it trying to create 10 in your homedir?
Comment 2 Michal Nowak 2013-05-16 14:10:28 EDT
Hmm, I don't know -- is there a way to test it? Anyway, it created following:

Comment 3 Michal Nowak 2013-05-16 14:12:02 EDT
Disregard #2. Yes it does create '10' in /home/newman/.icedtea/cache/:

Comment 4 Miroslav Grepl 2013-05-17 04:09:45 EDT
Try to execute

# chcon -R -t mozilla_home_t /home/newman/.icedtea

should fix it.
Comment 5 Fedora Update System 2013-05-17 06:59:54 EDT
selinux-policy-3.11.1-95.fc18 has been submitted as an update for Fedora 18.
Comment 6 Fedora Update System 2013-05-18 22:43:26 EDT
Package selinux-policy-3.11.1-95.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-95.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2013-05-21 04:39:31 EDT
selinux-policy-3.11.1-95.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Devon Janitz 2013-05-22 20:04:22 EDT
This error seemed to still occured when I used Monzilla to browse to and logged into logmein.com
Comment 9 Miroslav Grepl 2013-05-23 04:59:56 EDT
# chcon -R -t mozilla_home_t /home/newman/.icedtea

should fix it for now.
Comment 10 Devon Janitz 2013-05-23 22:14:09 EDT
Thanks very much!  Work great!
Comment 11 michael.sez 2013-06-06 19:40:44 EDT
I see this is closed but I am seeing a similar problem with webex on Fedora 17.

webex is trying to write to ~/.webex directory tree.  Will this fix correct this problem also?  WIll is be backported to Fedora 17?
Comment 12 michael.sez 2013-06-06 19:47:47 EDT
Forgot to say the chcon command Miroslav Grepl posted fixes this webex problem 
for me.
Comment 13 Miroslav Grepl 2013-06-07 02:56:25 EDT
No, this bug was about .icedtea.

Michael, could you open a new one for ~/.webex

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