REDHAT-BUG-2457729: High severity Red Hat OpenShift vulnerability
Summary: Possible DOS in SPDY streaming code, used for attach, exec and port forwarding.
Requirements To Exploit: Access to the kubelet's endpoint (granted through nodes/proxy) or access to any of portforward, exec, or attach to pods. These all can be represented by the cluster roles
pods/portforward (create)
pods/exec (create)
pods/attach (create)
nodes/proxy (get/create)
Component Affected: Kubelet, CRI-O, kube-apiserver
Version Affected: Openshift 4.21.4 and below
Patch Available: yes
Version Fixed: none yet
Cvss: (Based on [https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator]). Please note that only the Base Score Metrics are required by the incident response team.
Impact: Based on the https://access.redhat.com/security/updates/classification , what do you think would be the impact and why? This helps a lot the analyst to understand why such a report must be or not considered Moderate/Important or even Critical.
Steps To Reproduce: apply:
— apiVersion: v1 kind: ServiceAccount metadata: name: poc-sa-portforward namespace: default — apiVersion: [rbac.authorization.k8s.io/v1:(http://rbac.authorization.k8s.io/v1)(http://rbac.authorization.k8s.io/v1)] kind: Role metadata: name: poc-role-portforward namespace: default rules:
apiGroups: [""] resources: ["pods/portforward"] verbs: ["create"] — apiVersion: [rbac.authorization.k8s.io/v1:(http://rbac.authorization.k8s.io/v1)(http://rbac.authorization.k8s.io/v1)] kind: RoleBinding metadata: name: poc-rb-portforward namespace: default subjects:
kind: ServiceAccount name: poc-sa-portforward namespace: default roleRef: kind: Role name: poc-role-portforward apiGroup: rbac.authorization.k8s.io — apiVersion: v1 kind: Pod metadata: name: poc-target namespace: default spec: containers:
name: nginx image: nginx:alpine
set env:
export APISERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}' | sed 's|https://||')
export TOKEN=$(kubectl create token poc-sa-portforward)
export POD=poc-target
run attached pocportforward.py
Mitigation: disable the above cluster roles from untrusted users.
Embargo Reason: Coordination with three upstream communities: containerd, CRI-O, kubernetes
Original Report: https://github.com/moby/spdystream/security/advisories/GHSA-pc3f-x583-g7j2
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
OpenShiftto a version that resolves this vulnerability.Fixed in 4.21.4 - Configuration
Disable the cluster roles that grant access to nodes/proxy, pods/attach, pods/exec, and pods/portforward for untrusted users (the material explicitly says: "disable the above cluster roles from untrusted users").
Kubernetes RBAC ClusterRole / Role rules = Disable the above cluster roles from untrusted users
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2457729?
REDHAT-BUG-2457729 has been identified as a potential Denial of Service (DoS) vulnerability in the SPDY streaming code.
How do I fix REDHAT-BUG-2457729?
To mitigate REDHAT-BUG-2457729, ensure that your Red Hat OpenShift deployment is upgraded to version 4.21.5 or later.
Who is affected by REDHAT-BUG-2457729?
REDHAT-BUG-2457729 affects users of Red Hat OpenShift versions up to and including 4.21.4, as well as Kubernetes kubelet and kube-apiserver components.
What are the potential exploits for REDHAT-BUG-2457729?
Exploitation of REDHAT-BUG-2457729 requires access to the kubelet's endpoint or permissions for pods to port forward, exec, or attach.
Is there a way to secure my system against REDHAT-BUG-2457729?
To secure your system against REDHAT-BUG-2457729, restrict access to kubelet endpoints and roles that allow pod manipulation.