A security issue was discovered with Kubernetes affecting multitenant clusters. If a potential attacker can already create or edit services and pods, then they may be able to intercept traffic from other pods (or nodes) in the cluster.
ExternalIP admission plugin prevents this from being exploited, added in OpenShift v1:
Name: the Kubernetes Product Security Committee
Upstream: Etienne Champetier (Anevia)
ExternalIP addresses ranges can be configured as described below. OCP 4 is secure by default, though cluster-admins can whitelist externalIP addresses as needed. OCP 3.11 can be secured by changing `externalIPNetworkCIDR` to "0.0.0.0/32", which blocks all externalIP address values.
Users can check if they have permission to patch the Status of a LoadBalancer Service with the command: `kubectl auth can-i patch service --subresource=status`. In OCP, by default only cluster-admins are granted this permission.
The default master.config installed in OCP 3.11 sets externalIPNetworkCIDRs to 0.0.0.0/0, which allows all IP addresses:
$ cat /etc/origin/master/master-config.yaml
Created kubernetes tracking bugs for this issue:
Affects: fedora-all [bug 1910192]
OpenShift Container Platform (OCP) includes a builtin externalIP admission plugin, which restricts the use of Service eternalIPs to those configured by a cluster-admin. In OCP4 all externalIP ranges are disabled by default. In OCP 3.11, the default range is "0.0.0.0/0", which allows all IP addresses.
The second attack vector, via patching the Status of a LoadBalancer Service, is not possible unless permission to patch service/status is granted. OCP does not grant this permission to users who are not cluster-admins.
OCP 4 is not affected by this vulnerability as it is secure by default. OCP 3.11 is affected, however the vulnerability can be by mitigated by configuring the builtin externalIP admission plugin.
This issue has been addressed in the following products:
Red Hat OpenShift Container Platform 3.11
Via RHSA-2021:0079 https://access.redhat.com/errata/RHSA-2021:0079
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):