CVE-2022-1708: Github.com/cri o/cri o Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-fcm2-6c3h-pg6j
CVSS 7.5
CWE-400 CWE-770
Published
Advisory Summary

CVE-2022-1708 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/cri o/cri o libraries in the Go ecosystem. The issue involves node dos by way of memory exhaustion through execsync request in cri-o. Remediation is available by upgrading affected packages to version 1.24.1, 1.23.3, 1.22.5.

CVE-2022-1708 at a Glance

CVE Identifier CVE-2022-1708
GHSA Identifier GHSA-fcm2-6c3h-pg6j
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Github.com/cri o/cri o
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2022-1708

To remediate this vulnerability, upgrade all affected Github.com/cri o/cri o dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/cri-o/cri-o fixed: 1.24.1
Upgrade github.com/cri-o/cri-o to 1.24.1
github.com/cri-o/cri-o fixed: 1.23.3
Upgrade github.com/cri-o/cri-o to 1.23.3
github.com/cri-o/cri-o fixed: 1.22.5
Upgrade github.com/cri-o/cri-o to 1.22.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/cri-o/cri-o

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-1708, inspect your project dependencies for Github.com/cri o/cri o:

inspect dependencies for github.com/cri-o/cri-o

Analyze the terminal output to locate any version of Github.com/cri o/cri o in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.24.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/cri o/cri o, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Description An ExecSync request runs a command in a container and returns the output to the Kubelet. It is used for readiness and liveness probes within a pod. The way CRI-O runs ExecSync commands is through conmon. CRI-O asks conmon to start the process, and conmon writes the output to disk. CRI-O then reads the output and returns it to the Kubelet. If the output of the command is large enough, it is possible to exhaust the memory (or disk usage) of the node. The following deployment is an example yaml file that will output around 8GB of ‘A’ characters, which would be written to disk by conmon and read by CRI-O. ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment100 spec: selector: matchLabels: app: nginx replicas: 2 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 lifecycle: postStart: exec: command: ["/bin/sh", "-c", "seq 1 50000000`; do echo -n 'aaaaaaaaaaaaaaaa'; done"] ``` ### Impact It is possible for the node to be exhausted of memory or disk space, depending on the node the command is being run on. What is further problematic is that the memory and disk usage aren't attributed to the container, as this file and its processing are implementation details of CRI-O. The consequence of the exhaustion is that other services on the node, e.g. other containers, will be unable to allocate memory and thus causing a denial of service. ### Patches This vulnerability will be fixed in 1.24.1, 1.23.3, 1.22.5, v1.21.8, v1.20.8, v1.19.7 ### Workarounds At the time of writing, no workaround exists other than ensuring only trusted images are used. ### References https://github.com/containerd/containerd/security/advisories/GHSA-5ffw-gxpp-mxpf ### For more information If you have any questions or comments about this advisory: * Open an issue in [the CRI-O repo](http://github.com/cri-o/cri-o/issues) * To make a report, email your vulnerability to the private [cncf-crio-security@lists.cncf.io](mailto:cncf-crio-security@lists.cncf.io) list with the security details and the details expected for [all CRI-O bug reports](https://github.com/cri-o/cri-o/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml). ### Credits Disclosed by Ada Logics in a security audit sponsored by CNCF and facilitated by OSTIF.

CVE-2022-1708 Affected Github.com/cri o/cri o Versions

3 component(s)
Fixed Versions:
1.24.11.23.31.22.5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cri-o/cri-o
Go
≥ 1.24.0
< 1.24.1
All 1 versions
1.24.0
1.24.1
github.com/cri-o/cri-o
Go
≥ 1.23.0
< 1.23.3
1.23.3
github.com/cri-o/cri-o
Go
< 1.22.5
1.22.5

References

Frequently Asked Questions

What is CVE-2022-1708?
CVE-2022-1708 is a security vulnerability in Github.com/cri o/cri o involving Node DOS by way of memory exhaustion through ExecSync request in CRI-O under CWE-400: Uncontrolled Resource Consumption.
Which Github.com/cri o/cri o versions are affected?
Affected versions include releases prior to 1.24.1, 1.23.3, 1.22.5 across affected packages: github.com/cri-o/cri-o.
What version fixes CVE-2022-1708?
Upgrading to 1.24.1, 1.23.3, 1.22.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cri-o/cri-o affected?
Yes, github.com/cri-o/cri-o is affected in releases prior to 1.24.1, 1.23.3, 1.22.5. Upgrade your dependency to 1.24.1, 1.23.3, 1.22.5 or later.
What is the CVSS score of CVE-2022-1708?
CVE-2022-1708 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2022-1708?
CVE-2022-1708 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for CVE-2022-1708?
Run the dependency tree command: 'inspect dependencies for github.com/cri-o/cri-o'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fcm2-6c3h-pg6j",
  "modified" : "2023-07-24T19:33:40Z",
  "published" : "2022-06-06T21:50:21Z",
  "aliases" : [ "CVE-2022-1708" ],
  "summary" : "Node DOS by way of memory exhaustion through ExecSync request in CRI-O",
  "details" : "### Description\nAn ExecSync request runs a command in a container and returns the output to the Kubelet. It is used for readiness and liveness probes within a pod. The way CRI-O runs ExecSync commands is through conmon. CRI-O asks conmon to start the process, and conmon writes the output to disk. CRI-O then reads the output and returns it to the Kubelet.\n\nIf the output of the command is large enough, it is possible to exhaust the memory (or disk usage) of the node. The following deployment is an example yaml file that will output around 8GB of ‘A’ characters, which would be written to disk by conmon and read by CRI-O.\n\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: nginx-deployment100\nspec:\n  selector:\n    matchLabels:\n      app: nginx\n  replicas: 2\n  template:\n    metadata:\n      labels:\n        app: nginx\n    spec:\n      containers:\n      - name: nginx\n        image: nginx:1.14.2\n        lifecycle:\n          postStart:\n            exec:\n              command: [\"/bin/sh\", \"-c\", \"seq 1 50000000`; do echo -n 'aaaaaaaaaaaaaaaa'; done\"]\n```\n\n### Impact\nIt is possible for the node to be exhausted of memory or disk space, depending on the node the command is being run on. What is further problematic is that the memory and disk usage aren't attributed to the container, as this file and its processing are implementation details of CRI-O. The consequence of the exhaustion is that other services on the node, e.g. other containers, will be unable to allocate memory and thus causing a denial of service.\n\n### Patches\nThis vulnerability will be fixed in 1.24.1, 1.23.3, 1.22.5, v1.21.8, v1.20.8, v1.19.7\n\n### Workarounds\nAt the time of writing, no workaround exists other than ensuring only trusted images are used.\n\n### References\nhttps://github.com/containerd/containerd/security/advisories/GHSA-5ffw-gxpp-mxpf\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the CRI-O repo](http://github.com/cri-o/cri-o/issues)\n* To make a report, email your vulnerability to the private\n[cncf-crio-security@lists.cncf.io](mailto:cncf-crio-security@lists.cncf.io) list\nwith the security details and the details expected for [all CRI-O bug\nreports](https://github.com/cri-o/cri-o/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml).\n\n### Credits\nDisclosed by Ada Logics in a security audit sponsored by CNCF and facilitated by OSTIF.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cri-o/cri-o"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.24.0"
      }, {
        "fixed" : "1.24.1"
      } ]
    } ],
    "versions" : [ "1.24.0" ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cri-o/cri-o"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.23.0"
      }, {
        "fixed" : "1.23.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cri-o/cri-o"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.22.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cri-o/cri-o/security/advisories/GHSA-fcm2-6c3h-pg6j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-1708"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cri-o/cri-o/commit/f032cf649ecc7e0c46718bd9e7814bfb317cb544"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2085361"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cri-o/cri-o"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-06T21:50:21Z",
    "nvd_published_at" : "2022-06-07T18:15:00Z"
  }
}