Description of problem: A hostnetwork pod can access MCS port 22623 or 22624 on master on OVNKubernetes cluster. We should restrict that on OVN as well like we do in OpenShiftSDN Version-Release number of selected component (if applicable):4.2.0-0.nightly-2019-10-07-011045 How reproducible:Always Steps to Reproduce: 1.Create a hostnetwork pod with kubeadmin as user $ oc login -u kubeadmin -p xxxxx $oc create -f https://raw.githubusercontent.com/anuragthehatter/v3-testfiles/master/networking/hostnetwork-pod.json 2.oc rsh into pod and curl on master IP on port 22623 and 22624 $ oc rsh hello-pod ~$curl -I http://10.0.129.26:22623/config/master -k HTTP/2 200 ~$curl -I http://10.0.129.26:22623/config/master -k HTTP/2 200 Actual results: Hostnetwork pod can access MCS ports Expected results: Hostnetwork pod should not access MCS ports Additional info:
Oh, I think this is not a bug; we originally had to block hostNetwork access to MCS, but I think MCS now recognizes that the node is already provisioned and so there's no danger in connect to it from an existing node IP. I need to double-check this though... (And if it's correct we should remove the hostNetwork blocking from openshift-sdn too.)
I don't think that's true, because the MCS is also exposed via the internal load balancer.
Hm... it looks like https://github.com/openshift/machine-config-operator/pull/784 never merged so probably we do still need to block from hostNetwork
Verified on 4.5.0-0.nightly-2020-05-24-223848. oc rsh hostnetwork-pod ~ $ curl -I http://10.0.98.83:22623/config/master -k curl: (7) Failed to connect to 10.0.98.83 port 22623: Connection refused ~ $ exit command terminated with exit code 7
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2409