Bug 979701 - SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64/jre/bin/java from 'name_connect' accesses on the tcp_socket .
SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64/jre/bin...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:fa5cce09d396a2b8add304bb0f0...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-29 10:59 EDT by colin
Modified: 2013-07-02 07:20 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-01 06:49:19 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 colin 2013-06-29 10:59:18 EDT
Description of problem:
SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64/jre/bin/java from 'name_connect' accesses on the tcp_socket .

*****  Plugin catchall (100. 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:whois_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        java
Source Path                   /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64/jr
                              e/bin/java
Port                          4321
Host                          (removed)
Source RPM Packages           java-1.7.0-openjdk-1.7.0.25-2.3.10.3.fc17.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-170.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.8.13-100.fc17.x86_64 #1 SMP Mon
                              May 13 13:36:17 UTC 2013 x86_64 x86_64
Alert Count                   218
First Seen                    2013-06-29 13:12:19 BST
Last Seen                     2013-06-29 15:02:59 BST
Local ID                      356f7cf7-c5ed-44ff-a8b1-c91495a83d74

Raw Audit Messages
type=AVC msg=audit(1372514579.580:354): avc:  denied  { name_connect } for  pid=6388 comm="java" dest=4321 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:whois_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1372514579.580:354): arch=x86_64 syscall=connect success=no exit=EACCES a0=17 a1=7feaa3bb5470 a2=1c a3=f20 items=0 ppid=6182 pid=6388 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=1 tty=(none) comm=java exe=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64/jre/bin/java subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: java,mozilla_plugin_t,whois_port_t,tcp_socket,name_connect

audit2allow

#============= mozilla_plugin_t ==============
#!!!! This avc can be allowed using one of the these booleans:
#     mozilla_plugin_can_network_connect, allow_ypbind

allow mozilla_plugin_t whois_port_t:tcp_socket name_connect;

audit2allow -R

#============= mozilla_plugin_t ==============
#!!!! This avc can be allowed using one of the these booleans:
#     mozilla_plugin_can_network_connect, allow_ypbind

allow mozilla_plugin_t whois_port_t:tcp_socket name_connect;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.13-100.fc17.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-07-01 06:49:19 EDT
Please run

# setsebool -P mozilla_plugin_can_network_connect 1

Do you know why it needs to connect to this port?
Comment 2 colin 2013-07-01 12:02:24 EDT
>Do you know why it needs to connect to this port?

TBH my memory of that is fading already...
It might have been to allow a connection to a Netlab remote access server.
(http://www.netdevgroup.com/products/)

I recall that this warning appeared after I had run some 'yum update's

yum logs are available if necessary
 
[root@K8 yum]# grep java /var/log/audit/audit.log | wc -l
462
!!!

[colin@K8 ~]$ getsebool mozilla_plugin_can_network_connect
mozilla_plugin_can_network_connect --> off

>Please run
>
># setsebool -P mozilla_plugin_can_network_connect 1

[colin@K8 ~]$ getsebool mozilla_plugin_can_network_connect
mozilla_plugin_can_network_connect --> on

;-)
Comment 3 Daniel Walsh 2013-07-02 07:13:00 EDT
Seems like something we probably should allow by default.
Comment 4 Daniel Walsh 2013-07-02 07:20:16 EDT
eb474d48b25b1b0b8abba10bf8e925f5115ef87c fixes this in git.

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