Bug 963143

Summary: SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19.x86_64/jre/bin/java from 'create' accesses on the directory 10.
Product: [Fedora] Fedora Reporter: Michal Nowak <mnowak>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: devonjanitz, dominick.grift, dwalsh, mgrepl, michael.sez
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:4ffb332e1aa2054f88d8e6c25a3b4418247155285b6add676aa58b36c7558227
Fixed In Version: selinux-policy-3.11.1-95.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-21 08:39: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 Michal Nowak 2013-05-15 08:55:03 UTC
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-1.7.0.19.x86_64/jre/bin/java 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.
Do
# 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.
Do
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
                              0.c1023
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-1.7.0.19.x86_64/jr
                              e/bin/java
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           java-1.7.0-openjdk-1.7.0.19-2.3.9.3.fc18.x86_64
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-1.7.0.19.x86_64/jre/bin/java subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: java,mozilla_plugin_t,user_home_t,dir,create

audit2allow

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

audit2allow -R
require {
	type mozilla_plugin_t;
}

#============= mozilla_plugin_t ==============
userdom_manage_user_home_content_dirs(mozilla_plugin_t)


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.11-200.fc18.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-05-16 17:34:06 UTC
Is it trying to create 10 in your homedir?

Comment 2 Michal Nowak 2013-05-16 18:10:28 UTC
Hmm, I don't know -- is there a way to test it? Anyway, it created following:

/home/newman/kbpki/
/home/newman/kbpki/nativLib
/home/newman/kbpki/nativLib/libCIMNativeLib.so
/home/newman/kbpki/MojeBanka
/home/newman/kbpki/MojeBanka/temp
/home/newman/kbpki/MojeBanka/PKIApplet.properties

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

/home/newman/.icedtea/cache/10
/home/newman/.icedtea/cache/10/https
/home/newman/.icedtea/cache/10/https/www.mojebanka.cz
/home/newman/.icedtea/cache/10/https/www.mojebanka.cz/jars
/home/newman/.icedtea/cache/10/https/www.mojebanka.cz/jars/detectVM.jar.gz
/home/newman/.icedtea/cache/10/https/www.mojebanka.cz/jars/detectVM.jar.gz.info

Comment 4 Miroslav Grepl 2013-05-17 08:09:45 UTC
Try to execute

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

should fix it.

Comment 5 Fedora Update System 2013-05-17 10:59:54 UTC
selinux-policy-3.11.1-95.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-95.fc18

Comment 6 Fedora Update System 2013-05-19 02:43:26 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2013-8591/selinux-policy-3.11.1-95.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-05-21 08:39:31 UTC
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-23 00:04:22 UTC
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 08:59:56 UTC
# chcon -R -t mozilla_home_t /home/newman/.icedtea


should fix it for now.

Comment 10 Devon Janitz 2013-05-24 02:14:09 UTC
Thanks very much!  Work great!
Devon

Comment 11 michael.sez 2013-06-06 23:40:44 UTC
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 23:47:47 UTC
Forgot to say the chcon command Miroslav Grepl posted fixes this webex problem 
for me.

Comment 13 Miroslav Grepl 2013-06-07 06:56:25 UTC
No, this bug was about .icedtea.

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