Bug 1926568 (CVE-2021-20238) - CVE-2021-20238 openshift/machine-config-operator: unauthenticated access to Machine Config Server ignition config
Summary: CVE-2021-20238 openshift/machine-config-operator: unauthenticated access to M...
Keywords:
Status: NEW
Alias: CVE-2021-20238
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 1925494
Blocks: 1926028 1965031
TreeView+ depends on / blocked
 
Reported: 2021-02-09 04:38 UTC by Sam Fowler
Modified: 2024-11-02 08:27 UTC (History)
15 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Sam Fowler 2021-02-09 04:38:22 UTC
When running OpenShift with Red Hat supported network types, applications in the cluster are blocked from sending traffic to ports 22623 or 22624 via iptables rules injected into the pod.  This ensures that no unprivileged workloads are able to access the Machine Config Server (MCS) and download ignition configuration, which may contain sensitive information.

Unfortunately, this security measure is implemented within the code for the network plugins, so a cluster that uses another network plugin (like Calico, for example), would not have this protection mechanism in place.

In other words, all applications running on OpenShift clusters not using Red Hat supported network types will be able to access the MCS.

Comment 5 Sam Fowler 2021-04-30 06:50:20 UTC
Statement:

This flaw is planned to be addressed in a future enhancement:

https://issues.redhat.com/browse/GRPA-3642

Comment 7 Sam Fowler 2021-05-04 04:51:42 UTC
Mitigation:

- If deployed on Baremetal, OpenStack, Ovirt, Vsphere or KubeVirt, check if the ignition config is accessible from outside the cluster, e.g.
   
https://api.$cluster_name.$base_domain:22623/config/worker
  
Prevent access to this endpoint with an external firewall or load balancer.

- To protect the MCS endpoint within clusters, use a supported network plugin with OpenShift, namely: OpenShift SDN, OVN Kubernetes or kuryr.

- Ensure untrusted workloads are not run with hostNetwork access.

Comment 9 Sam Fowler 2021-05-04 05:01:14 UTC
Cluster types allowing external access to ignition config:

https://github.com/openshift/installer/blob/master/pkg/asset/ignition/machine/node.go#L36..L46

Comment 10 Sam Fowler 2021-05-04 05:01:35 UTC
Upstream issue:

https://github.com/openshift/okd/issues/176


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