ghsa-fcm2-6c3h-pg6j
Vulnerability from github
Published
2022-06-06 21:50
Modified
2023-07-24 19:33
Severity
Summary
Node DOS by way of memory exhaustion through ExecSync request in CRI-O
Details

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 * To make a report, email your vulnerability to the private cncf-crio-security@lists.cncf.io list with the security details and the details expected for all CRI-O bug reports.

Credits

Disclosed by Ada Logics in a security audit sponsored by CNCF and facilitated by OSTIF.

Show details on source website


{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/cri-o/cri-o"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.24.0"
            },
            {
              "fixed": "1.24.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "1.24.0"
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/cri-o/cri-o"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.23.0"
            },
            {
              "fixed": "1.23.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/cri-o/cri-o"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.22.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2022-1708"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2022-06-06T21:50:21Z",
    "nvd_published_at": "2022-06-07T18:15:00Z",
    "severity": "HIGH"
  },
  "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 \u2018A\u2019 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 \u0027aaaaaaaaaaaaaaaa\u0027; 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\u0027t 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",
  "id": "GHSA-fcm2-6c3h-pg6j",
  "modified": "2023-07-24T19:33:40Z",
  "published": "2022-06-06T21:50:21Z",
  "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"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Node DOS by way of memory exhaustion through ExecSync request in CRI-O"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...