Bug 1113803

Summary: SELinux denies name_connect for neutron-server and neutron-metadata
Product: [Fedora] Fedora Reporter: Richard Su <rwsu>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.12.1-176.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-04 00:30:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
audit.log
none
ps -efZ output none

Description Richard Su 2014-06-27 00:31:04 UTC
Created attachment 912629 [details]
audit.log

Description of problem:
SELinux blocks name_connect for neutron-server and neutron-metadata. The result is user vm instances cannot start up or you cannot ssh to them.

COMMAND=ssh -o BatchMode=yes -o StrictHostKeyChecking=no fedora.2.46 ls
OUTPUT=Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Version-Release number of selected component (if applicable):
openstack-neutron-2014.1.1-3.fc21.noarch
openstack-neutron-ml2-2014.1.1-3.fc21.noarch
openstack-neutron-openvswitch-2014.1.1-3.fc21.noarch
selinux-policy-3.12.1-173.fc20.noarch
selinux-policy-targeted-3.12.1-173.fc20.noarch

How reproducible:
always

Steps to Reproduce:
1. Deploy overcloud and run overcloud tests using instack-undercloud

Actual results:
instack-test-overcloud fails with ssh error listed above

Expected results:
instack-test-overcloud should complete successfully

Additional info:
type=AVC msg=audit(1403803982.673:966): avc:  denied  { name_connect } for  pid=5052 comm="neutron-server" dest=5000 scontext=system_u:system_r:neutron_t:s0 tcontext=system_u:object_r:commplex_main_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1403804104.006:1178): avc:  denied  { name_connect } for  pid=4953 comm="neutron-metadat" dest=9696 scontext=system_u:system_r:neutron_t:s0 tcontext=system_u:object_r:neutron_port_t:s0 tclass=tcp_socket

Comment 1 Richard Su 2014-06-27 00:31:40 UTC
Created attachment 912630 [details]
ps -efZ output

Comment 2 Richard Su 2014-06-27 00:44:04 UTC
To provide more context, port 9696 is the default neutron server port (http://devstack.org/lib/neutron.html), and port 5000 is the public keystone port to which neutron is communicating.

Comment 3 Miroslav Grepl 2014-06-27 08:34:10 UTC
commit cc5c76edad72a1b914904e9891979e3203e0018e
Author: Miroslav Grepl <mgrepl>
Date:   Fri Jun 27 10:32:41 2014 +0200

    Allow neutron to connect to tcp/5000

commit 8283d73bae6f358facf7cfd2991451037775cdb4
Author: Miroslav Grepl <mgrepl>
Date:   Fri Jun 27 10:31:28 2014 +0200

    Allow neutron to connet to neutron port

Comment 4 Richard Su 2014-06-27 19:10:57 UTC
Thanks Miroslav. I have confirmed this has been fixed with selinux-policy-targeted-3.12.1-174.fc20.

Comment 5 Fedora Update System 2014-07-02 12:40:07 UTC
selinux-policy-3.12.1-176.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-176.fc20

Comment 6 Fedora Update System 2014-07-03 04:09:06 UTC
Package selinux-policy-3.12.1-176.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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-176.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8029/selinux-policy-3.12.1-176.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-07-04 00:30:58 UTC
selinux-policy-3.12.1-176.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.