GHSA-w2j5-3rcx-vx7x: Github.com/cri o/cri o Sysctls Applied To Containers With Vulnerability

MODERATE
Published
Advisory Summary

GHSA-w2j5-3rcx-vx7x is a MODERATE sysctls applied to containers with vulnerability (General Security Weakness) affecting Github.com/cri o/cri o libraries in the Go ecosystem. The issue involves sysctls applied to containers with host ipc or host network namespaces can affect the host. Remediation is available by upgrading affected packages to version 1.23.1, 1.22.2, 1.21.5, 1.20.6, 1.19.5.

GHSA-w2j5-3rcx-vx7x at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-w2j5-3rcx-vx7x
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Github.com/cri o/cri o
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-w2j5-3rcx-vx7x

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.23.1
Upgrade github.com/cri-o/cri-o to 1.23.1
github.com/cri-o/cri-o fixed: 1.22.2
Upgrade github.com/cri-o/cri-o to 1.22.2
github.com/cri-o/cri-o fixed: 1.21.5
Upgrade github.com/cri-o/cri-o to 1.21.5
github.com/cri-o/cri-o fixed: 1.20.6
Upgrade github.com/cri-o/cri-o to 1.20.6
github.com/cri-o/cri-o fixed: 1.19.5
Upgrade github.com/cri-o/cri-o to 1.19.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 GHSA-w2j5-3rcx-vx7x, 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.23.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 General Security Weakness. 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

### Impact Before setting the sysctls for a pod, the pods namespaces must be unshared (created). However, in cases where the pod is using a host network or IPC namespace, a bug in CRI-O caused the namespace creating tool [pinns](https://github.com/cri-o/cri-o/tree/main/pinns/) to configure the sysctls of the host. This allows a malicious user to set sysctls on the host, assuming they have access to hostNetwork and hostIPC. Any CRI-O cluster after CRI-O 1.18 that drops the infra container 1.22 and 1.23 clusters drop infra container by default, and are thus vulnerable by default. ### Patches CRI-O versions 1.24.0, 1.23.1, 1.22.2, 1.21.5, 1.20.6, 1.19.5 all have the patches. ### Workarounds Users can set `manage_ns_lifecycle` to false, which causes the sysctls to be configured by the OCI runtime, which typically filter these cases. This option is available in 1.20 and 1.19. Newer versions don't have this option. An admission webhook could also be created to deny pods that use host IPC or network namespaces and also attempt to configure sysctls related to that namespace. ### 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).

GHSA-w2j5-3rcx-vx7x Affected Github.com/cri o/cri o Versions

5 component(s)
Fixed Versions:
1.23.11.22.21.21.51.20.61.19.5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cri-o/cri-o
Go
≥ 1.23.0
< 1.23.1
1.23.1
github.com/cri-o/cri-o
Go
≥ 1.22.0
< 1.22.2
1.22.2
github.com/cri-o/cri-o
Go
≥ 1.21.0
< 1.21.5
1.21.5
github.com/cri-o/cri-o
Go
≥ 1.20.0
< 1.20.6
1.20.6
github.com/cri-o/cri-o
Go
≥ 1.18.0
< 1.19.5
1.19.5

References

Frequently Asked Questions

What is GHSA-w2j5-3rcx-vx7x?
GHSA-w2j5-3rcx-vx7x is a security vulnerability in Github.com/cri o/cri o involving Sysctls applied to containers with host IPC or host network namespaces can affect the host under General Security Weakness.
Which Github.com/cri o/cri o versions are affected?
Affected versions include releases prior to 1.23.1, 1.22.2, 1.21.5, 1.20.6, 1.19.5 across affected packages: github.com/cri-o/cri-o.
What version fixes GHSA-w2j5-3rcx-vx7x?
Upgrading to 1.23.1, 1.22.2, 1.21.5, 1.20.6, 1.19.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.23.1, 1.22.2, 1.21.5, 1.20.6, 1.19.5. Upgrade your dependency to 1.23.1, 1.22.2, 1.21.5, 1.20.6, 1.19.5 or later.
What CWE is associated with GHSA-w2j5-3rcx-vx7x?
GHSA-w2j5-3rcx-vx7x is classified under General Security Weakness.
How can I check Go dependencies for GHSA-w2j5-3rcx-vx7x?
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-w2j5-3rcx-vx7x",
  "modified" : "2022-03-15T20:02:54Z",
  "published" : "2022-03-15T20:02:54Z",
  "aliases" : [ ],
  "summary" : "Sysctls applied to containers with host IPC or host network namespaces can affect the host",
  "details" : "### Impact\nBefore setting the sysctls for a pod, the pods namespaces must be unshared (created). However, in cases where the pod is using a host network or IPC namespace, a bug in CRI-O caused the namespace creating tool [pinns](https://github.com/cri-o/cri-o/tree/main/pinns/) to configure the sysctls of the host. This allows a malicious user to set sysctls on the host, assuming they have access to hostNetwork and hostIPC.\n\nAny CRI-O cluster after CRI-O 1.18 that drops the infra container\n1.22 and 1.23 clusters drop infra container by default, and are thus vulnerable by default.\n\n### Patches\nCRI-O versions 1.24.0, 1.23.1, 1.22.2, 1.21.5, 1.20.6, 1.19.5 all have the patches.\n\n### Workarounds\nUsers can set `manage_ns_lifecycle` to false, which causes the sysctls to be configured by the OCI runtime, which typically filter these cases. This option is available in 1.20 and 1.19. Newer versions don't have this option.\nAn admission webhook could also be created to deny pods that use host IPC or network namespaces and also attempt to configure sysctls related to that namespace.\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).",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cri-o/cri-o"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.23.0"
      }, {
        "fixed" : "1.23.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cri-o/cri-o"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.22.0"
      }, {
        "fixed" : "1.22.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cri-o/cri-o"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.21.0"
      }, {
        "fixed" : "1.21.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cri-o/cri-o"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.20.0"
      }, {
        "fixed" : "1.20.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cri-o/cri-o"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.18.0"
      }, {
        "fixed" : "1.19.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cri-o/cri-o/security/advisories/GHSA-w2j5-3rcx-vx7x"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cri-o/cri-o"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-15T20:02:54Z",
    "nvd_published_at" : null
  }
}