Kubernetes node disk Denial of Service by writing to container /etc/hosts
Published Jul 23, 2020
5.5
MEDIUMCVSS 3.1
EPSS 0.50%
Description
The Kubernetes kubelet component in versions 1.1-1.16.12, 1.17.0-1.17.8 and 1.18.0-1.18.5 do not account for disk usage by a pod which writes to its own /etc/hosts file. The /etc/hosts file mounted in a pod by kubelet is not included by the kubelet eviction manager when calculating ephemeral storage usage by a pod. If a pod writes a large amount of data to the /etc/hosts file, it could fill the storage space of the node and cause the node to fail.
Affected products
-
Affected
- 1.1
- 1.10
- 1.11
- 1.12
- 1.13
- 1.14
- 1.15
- ≥ 1.16, < 1.16.13
- ≥ 1.17, < 1.17.9
- ≥ 1.18, < 1.18.6
- 1.2
- 1.3
- 1.4
- 1.5
- 1.6
- 1.7
- 1.8
- 1.9
Default status is the baseline for the product. Each version can override it (patched versions can be marked unaffected).
| Vendor | Product | Default status | Versions |
|---|---|---|---|
| Kubernetes | Kubernetes | unknown | Affected
|
- < 1.16.13
- ≥ 1.17.0 · < 1.17.9
- ≥ 1.18.0 · < 1.18.6
No data.
Red Hat OpenShift Container Platform 3.11
atomic-openshift-0:3.11.542-1.git.0.f2fd300.el7
Fixed · RHSA-2021:3915
Red Hat OpenShift Container Platform 4.3
openshift-0:4.3.37-202009120213.p0.git.0.dffefe4.el8
Fixed · RHSA-2020:3808
Red Hat OpenShift Container Platform 4.3
openshift4/ose-hyperkube:v4.3.37-202009151447.p0
Fixed · RHSA-2020:3809
Red Hat OpenShift Container Platform 4.4
openshift-0:4.4.0-202008250319.p0.git.0.d653415.el7
Fixed · RHSA-2020:3579
Red Hat OpenShift Container Platform 4.4
openshift4/ose-hyperkube:v4.4.0-202008250319.p0
Fixed · RHSA-2020:3580
Red Hat OpenShift Container Platform 4.5
openshift-0:4.5.0-202008130146.p0.git.0.aaf1d57.el7
Fixed · RHSA-2020:3519
Red Hat OpenShift Container Platform 4.5
openshift4/ose-hyperkube:v4.5.0-202008130146.p0
Fixed · RHSA-2020:3520
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat OpenShift Container Platform 3.11 | atomic-openshift-0:3.11.542-1.git.0.f2fd300.el7 | Fixed | RHSA-2021:3915 |
| Red Hat OpenShift Container Platform 4.3 | openshift-0:4.3.37-202009120213.p0.git.0.dffefe4.el8 | Fixed | RHSA-2020:3808 |
| Red Hat OpenShift Container Platform 4.3 | openshift4/ose-hyperkube:v4.3.37-202009151447.p0 | Fixed | RHSA-2020:3809 |
| Red Hat OpenShift Container Platform 4.4 | openshift-0:4.4.0-202008250319.p0.git.0.d653415.el7 | Fixed | RHSA-2020:3579 |
| Red Hat OpenShift Container Platform 4.4 | openshift4/ose-hyperkube:v4.4.0-202008250319.p0 | Fixed | RHSA-2020:3580 |
| Red Hat OpenShift Container Platform 4.5 | openshift-0:4.5.0-202008130146.p0.git.0.aaf1d57.el7 | Fixed | RHSA-2020:3519 |
| Red Hat OpenShift Container Platform 4.5 | openshift4/ose-hyperkube:v4.5.0-202008130146.p0 | Fixed | RHSA-2020:3520 |
k8s.io/kubernetes/pkg/kubelet
Go
Introduced 1.1.0 Fixed 1.16.13k8s.io/kubernetes/pkg/kubelet
Go
Introduced 1.17.0 Fixed 1.17.9k8s.io/kubernetes/pkg/kubelet
Go
Introduced 1.18.0 Fixed 1.18.6k8s.io/kubernetes
Go
Introduced 1.1.0 Fixed 1.16.13k8s.io/kubernetes
Go
Introduced 1.17.0 Fixed 1.17.9k8s.io/kubernetes
Go
Introduced 1.18.0 Fixed 1.18.6
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | k8s.io/kubernetes/pkg/kubelet | 1.1.0 | 1.16.13 |
| Go | k8s.io/kubernetes/pkg/kubelet | 1.17.0 | 1.17.9 |
| Go | k8s.io/kubernetes/pkg/kubelet | 1.18.0 | 1.18.6 |
| Go | k8s.io/kubernetes | 1.1.0 | 1.16.13 |
| Go | k8s.io/kubernetes | 1.17.0 | 1.17.9 |
| Go | k8s.io/kubernetes | 1.18.0 | 1.18.6 |
Remediation
Red Hat statement
In OpenShift Container Platform (OCP) there is LocalStorageCapacityIsolation feature gate functionality which prevents a denial of service (DoS) attack on the node by writing to the ephemeral storage.This feature is disabled by default in OCP 3.11 and can be enabled as per [1]. Even with enabled LocalStorageCapacityIsolation feature gate, OCP is affected by this vulnerability, therefore it is recommended to enable the feature gate and also upgrade to an OCP version which has a fix for this vulnerability. [1] https://docs.openshift.com/container-platform/3.11/install_config/configuring_ephemeral.html
Red Hat mitigation
On OpenShift Container Platform (OCP) 3.11 and 4.x it's possible to set the allowPrivilegeEscalation Security Context Constraint to 'false' to prevent this. Note that this is set to 'true' by default, and setting it to false will prevent certain binaries which require setuid to stop working. On OCP 3.11 for example the 'ping' command will no longer work [1]. On OCP 4.x and later the 'ping' command will work with allowPrivilegeEscalation set to False, but other setuid binaries will not work. [1] https://docs.openshift.com/container-platform/3.11/release_notes/ocp_3_11_release_notes.html
References (15)
- https://access.redhat.com/security/cve/CVE-2020-8557 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1835977 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-1098 Advisory
- https://github.com/advisories/GHSA-55qj-gj3x-jq9r Advisory
- https://github.com/kubernetes/kubernetes/commit/530f199b6e07cdaab32361e39709ac45f3fdc446
- https://github.com/kubernetes/kubernetes/commit/68750fefd3df76b7b008ef7b18e8acd18d5c2f2e
- https://github.com/kubernetes/kubernetes/commit/7fd849cffa2f93061fbcb0a6ae4efd0539b1e981
- https://github.com/kubernetes/kubernetes/issues/93032 x_refsource_CONFIRMIssue TrackingPatchThird Party Advisory
- https://github.com/kubernetes/kubernetes/pull/92921
- https://groups.google.com/g/kubernetes-security-announce/c/cB_JUsYEKyY
- https://groups.google.com/g/kubernetes-security-announce/c/cB_JUsYEKyY/m/vVSO61AhBwAJ mailing-listx_refsource_MLISTMailing ListThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2020-8557
- https://pkg.go.dev/vuln/GO-2024-2753
- https://security.netapp.com/advisory/ntap-20200821-0002 x_refsource_CONFIRMThird Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2020-8557
Change history (0)
No recorded changes yet.
CVE.org / MITRE
CISA Vulnrichment
No data
GitHub