Bug 966167 - SELinux is preventing /usr/java/jre1.7.0_21/bin/java from name_connect access on the tcp_socket
Summary: SELinux is preventing /usr/java/jre1.7.0_21/bin/java from name_connect access...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-22 16:59 UTC by Clodoaldo Pinto Neto
Modified: 2013-05-31 04:25 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.11.1-97.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-31 04:25:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Clodoaldo Pinto Neto 2013-05-22 16:59:59 UTC
Description of problem:
Trying to access a bank site which uses the java plugin. Using Firefox

Version-Release number of selected component (if applicable):
selinux-policy-3.11.1-95.fc18

How reproducible:
Always

Steps to Reproduce:
1. Go to https://www2.bancobrasil.com.br/aapf/aai/login.pbk in Firefox 21

Actual results:
Error

Expected results:
Site access

Additional info:

SELinux is preventing /usr/java/jre1.7.0_21/bin/java from name_connect access on the tcp_socket .

*****  Plugin mozplugger (89.7 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_boolean (10.0 confidence) suggests  *******************

If you want to allow mozilla plugin domain to connect to the network using TCP.
Then you must tell SELinux about this by enabling the 'mozilla_plugin_can_network_connect' boolean.
You can read 'mozilla_selinux' man page for more details.
Do
setsebool -P mozilla_plugin_can_network_connect 1

*****  Plugin catchall (1.69 confidence) suggests  ***************************

If you believe that java should be allowed name_connect access on the  tcp_socket 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                system_u:object_r:jboss_management_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        java
Source Path                   /usr/java/jre1.7.0_21/bin/java
Port                          9999
Host                          cl.dkt
Source RPM Packages           jre-1.7.0_21-fcs.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-95.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     cl.dkt
Platform                      Linux cl.dkt 3.9.2-200.fc18.x86_64 #1 SMP Mon May
                              13 13:59:47 UTC 2013 x86_64 x86_64
Alert Count                   8
First Seen                    2013-05-22 13:14:25 BRT
Last Seen                     2013-05-22 13:14:52 BRT
Local ID                      867a5bd2-201c-49ff-b9e8-ba0e05e61a2e

Raw Audit Messages
type=AVC msg=audit(1369239292.361:1406): avc:  denied  { name_connect } for  pid=12058 comm="java" dest=9999 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:jboss_management_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1369239292.361:1406): arch=x86_64 syscall=connect success=no exit=EACCES a0=17 a1=7ffa862612a0 a2=1c a3=22e items=0 ppid=11886 pid=12058 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=53 tty=(none) comm=java exe=/usr/java/jre1.7.0_21/bin/java subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: java,mozilla_plugin_t,jboss_management_port_t,tcp_socket,name_connect

audit2allow

#============= mozilla_plugin_t ==============
#!!!! This avc can be allowed using the boolean 'mozilla_plugin_can_network_connect'

allow mozilla_plugin_t jboss_management_port_t:tcp_socket name_connect;

audit2allow -R
require {
	type mozilla_plugin_t;
}

#============= mozilla_plugin_t ==============
corenet_tcp_connect_jboss_management_port(mozilla_plugin_t)

Comment 1 Clodoaldo Pinto Neto 2013-05-22 17:02:07 UTC
The java plugin is the Oracle one.

Comment 2 Daniel Walsh 2013-05-23 15:29:03 UTC
a34501063c6b188e56548feda0db32c77000cce3 fixes this in git.

Comment 3 Miroslav Grepl 2013-05-24 07:22:28 UTC
Back ported.

Comment 4 Fedora Update System 2013-05-28 18:58:01 UTC
selinux-policy-3.11.1-97.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-97.fc18

Comment 5 Fedora Update System 2013-05-30 03:00:20 UTC
Package selinux-policy-3.11.1-97.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-97.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9612/selinux-policy-3.11.1-97.fc18
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-05-31 04:25:19 UTC
selinux-policy-3.11.1-97.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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