Bug 1113806

Summary: SELinux denies name_connect for neutron-metadata on unreserved_port_t
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:31:03 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 name_connect neutron-metadata on port 8775
none
ps -efZ output none

Description Richard Su 2014-06-27 00:37:47 UTC
Created attachment 912632 [details]
audit.log name_connect neutron-metadata on port 8775

Description of problem:
SELinux blocks name_connect neutron-metadata on port 8775. The result is user vm instances cannot start up or you cannot ssh to them. Port 8775 is used by the neutron metadata agent. https://github.com/openstack/neutron/blob/master/etc/metadata_agent.ini

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(1403808872.827:1275): avc:  denied  { name_connect } for  pid=4943 comm="neutron-metadat" dest=8775 scontext=system_u:system_r:neutron_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket

Comment 1 Richard Su 2014-06-27 00:38:19 UTC
Created attachment 912633 [details]
ps -efZ output

Comment 2 Miroslav Grepl 2014-06-27 08:34:40 UTC
commit b6da5570acbbd3b11f758c8a19efeb7f61196bc6
Author: Miroslav Grepl <mgrepl>
Date:   Fri Jun 27 10:30:37 2014 +0200

    Add tcp/8775 port as neutron port

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

Comment 4 Charles Crouch 2014-07-02 12:22:12 UTC
Moved to ASSIGNED to indicate Miroslav has looked at it.

Comment 5 Lukas Vrabec 2014-07-02 12:37:30 UTC
Moved to Modified

Comment 6 Fedora Update System 2014-07-02 12:40:11 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 7 Fedora Update System 2014-07-03 04:09:10 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 8 Fedora Update System 2014-07-04 00:31:03 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.