Bug 964653 - 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 .icedtea.
SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19.x86_64/jre/bin...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:4ffb332e1aa2054f88d8e6c25a3...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-19 08:08 EDT by Alex Murray
Modified: 2013-08-22 19:19 EDT (History)
6 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-47.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-29 23:33:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alex Murray 2013-05-19 08:08:38 EDT
Description of problem:
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 .icedtea.

*****  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 .icedtea 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                .icedtea [ 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.9.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-44.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.2-301.fc19.x86_64 #1 SMP Mon
                              May 13 12:36:24 UTC 2013 x86_64 x86_64
Alert Count                   39
First Seen                    2013-05-19 21:17:31 CST
Last Seen                     2013-05-19 21:36:27 CST
Local ID                      d0d193bc-c237-4cc0-b15e-e86b0ee86ccd

Raw Audit Messages
type=AVC msg=audit(1368965187.207:345): avc:  denied  { create } for  pid=10399 comm="java" name=".icedtea" 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(1368965187.207:345): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7f83140009f0 a1=1ff a2=7f83adcee260 a3=7f83add016e0 items=0 ppid=9265 pid=10399 auid=1000 uid=1000 gid=0 euid=1000 suid=1000 fsuid=1000 egid=0 sgid=0 fsgid=0 ses=1 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 -RYou must regenerate interface info by running /usr/bin/sepolgen-ifgen


Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.2-301.fc19.x86_64
type:           libreport

Potential duplicate: bug 963143
Comment 1 Daniel Walsh 2013-05-22 14:45:32 EDT
Fixed in selinux-policy-3.12.1-46.fc19.noarch
Comment 2 Fedora Update System 2013-05-29 10:19:51 EDT
selinux-policy-3.12.1-47.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-47.fc19
Comment 3 Fedora Update System 2013-05-29 13:46:47 EDT
Package selinux-policy-3.12.1-47.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-47.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9565/selinux-policy-3.12.1-47.fc19
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-05-29 23:33:50 EDT
selinux-policy-3.12.1-47.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Francisco de la Peña 2013-06-09 14:15:43 EDT
Problem still persists with selinux-policy-3.12.1-48.fc19
Comment 6 Miroslav Grepl 2013-06-11 10:50:34 EDT
What AVC are you getting?
Comment 7 Francisco de la Peña 2013-06-18 02:44:52 EDT
SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19.x86_64/jre/bin/java from create access on the directory 6.

selinux-policy-3.12.1-52.fc19.noarch

type=AVC msg=audit(1371537496.435:435): avc:  denied  { create } for  pid=2293 comm="java" name="6" 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(1371537496.435:435): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7ffc540a5f90 a1=1ff a2=7ffcea9da260 a3=7ffcea9ed6e0 items=0 ppid=2241 pid=2293 auid=1000 uid=1000 gid=0 euid=1000 suid=1000 fsuid=1000 egid=0 sgid=0 fsgid=0 ses=1 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
Comment 8 Miroslav Grepl 2013-06-18 03:13:15 EDT
Where is "6" located?
Comment 9 Francisco de la Peña 2013-06-18 20:14:19 EDT
Perhaps one of the browser cache folders, this is an existing temp file inside:
/home/fdelapena/.cache/mozilla/firefox/wwj6kumr.default/Cache/6/93/4203Ed01
Comment 10 Miroslav Grepl 2013-06-19 03:02:30 EDT
Please execute

# restorecon -R -v /home/fdelapena
Comment 11 Francisco de la Peña 2013-06-19 18:58:07 EDT
# restorecon -R -v /home/fdelapena
restorecon reset /home/fdelapena/.icedtea context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/.appletTrustSettings context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/security context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/security/trusted.certs context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/security/trusted.cacerts context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/security/trusted.jssecerts context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/security/trusted.clientcerts context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/security/trusted.jssecacerts context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/deployment.properties context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/recently_used context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/2 context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/2/https context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/2/https/www.bnonline.fi.cr context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/2/https/www.bnonline.fi.cr/wa context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/2/https/www.bnonline.fi.cr/wa/authmech context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/2/https/www.bnonline.fi.cr/wa/authmech/base context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/2/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar.info context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/0 context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/0/https context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/0/https/www.bnonline.fi.cr context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/0/https/www.bnonline.fi.cr/wa context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/0/https/www.bnonline.fi.cr/wa/authmech context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/0/https/www.bnonline.fi.cr/wa/authmech/base context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/0/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar.info context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/0/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/4 context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/4/https context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/4/https/www.bnonline.fi.cr context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/4/https/www.bnonline.fi.cr/wa context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/4/https/www.bnonline.fi.cr/wa/authmech context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/4/https/www.bnonline.fi.cr/wa/authmech/base context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/4/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar.info context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/4/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/3 context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/3/https context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/3/https/www.bnonline.fi.cr context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/3/https/www.bnonline.fi.cr/wa context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/3/https/www.bnonline.fi.cr/wa/authmech context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/3/https/www.bnonline.fi.cr/wa/authmech/base context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/3/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar.info context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/3/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/5 context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/5/https context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/5/https/www.bnonline.fi.cr context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/5/https/www.bnonline.fi.cr/wa context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/5/https/www.bnonline.fi.cr/wa/authmech context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/5/https/www.bnonline.fi.cr/wa/authmech/base context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/5/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar.info context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/5/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/1 context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/1/https context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/1/https/www.bnonline.fi.cr context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/1/https/www.bnonline.fi.cr/wa context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/1/https/www.bnonline.fi.cr/wa/authmech context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/1/https/www.bnonline.fi.cr/wa/authmech/base context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/1/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar.info context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.icedtea/cache/1/https/www.bnonline.fi.cr/wa/authmech/base/Web410.jar context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mozilla_home_t:s0
restorecon reset /home/fdelapena/.mplayer context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mplayer_home_t:s0
restorecon reset /home/fdelapena/.mplayer/config context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:mplayer_home_t:s0

By the way, there is a ~/.icedtea/cache/6 folder there.

It worked after applying the command.
Comment 12 Daniel Walsh 2013-06-20 13:10:56 EDT
That should fix your problem.
Comment 13 Francisco de la Peña 2013-06-20 13:12:29 EDT
Confirmed, thanks.
Comment 14 louisgtwo 2013-08-21 13:06:42 EDT
I believe I have encountered this. I did try restorecon -R -v /home/louieg1998


SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.x86_64/jre/bin/java from create access on the directory .icedtea.

*****  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 .icedtea 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_dir_t:s0
Target Objects                .icedtea [ dir ]
Source                        java
Source Path                   /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25-2.3.12.3.
                              fc19.x86_64/jre/bin/java
Port                          <Unknown>
Host                          <removed>
Source RPM Packages           java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-69.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     <removed>
Platform                      Linux tiger 3.10.7-200.fc19.x86_64 #1 SMP Thu Aug
                              15 23:19:45 UTC 2013 x86_64 x86_64
Alert Count                   142
First Seen                    2013-08-21 12:41:44 EDT
Last Seen                     2013-08-21 12:54:15 EDT
Local ID                      41dbb020-4156-421c-a325-2843c52d54d6

Raw Audit Messages
type=AVC msg=audit(1377104055.853:664): avc:  denied  { create } for  pid=4954 comm="java" name=".icedtea" scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_dir_t:s0 tclass=dir


type=SYSCALL msg=audit(1377104055.853:664): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7f26dc000bf0 a1=1ff a2=7f27700442c0 a3=7f2770057740 items=0 ppid=4118 pid=4954 auid=1001 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=2 tty=(none) comm=java exe=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.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_dir_t,dir,create
Comment 15 louisgtwo 2013-08-22 19:18:30 EDT
Well I just updated to selinux-policy-3.12.1-71.fc19.noarch and I can run java apps again.

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