ghsa-6x2m-w449-qwx7
Vulnerability from github
Impact
A flaw introduced in CRI-O version 1.19 which an attacker can use to bypass the safeguards and set arbitrary kernel parameters on the host. As a result, anyone with rights to deploy a pod on a Kubernetes cluster that uses the CRI-O runtime can abuse the kernel.core_pattern
kernel parameter to achieve container escape and arbitrary code execution as root on any node in the cluster.
Patches
The patches will be present in 1.19.6, 1.20.7, 1.21.6, 1.22.3, 1.23.2, 1.24.0
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 be created to deny pods that specify a
+
in the sysctl value of a pod. - A PodSecurityPolicy [deprecated] could be created, specifying all sysctls as forbidden like so:
```
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: sysctl-psp
spec:
forbiddenSysctls:
- "*" ``` However, this option will not work if any sysctls are required by any pods in the cluster.
Credits
Credit for finding this vulnerability goes to John Walker and Manoj Ahuje of Crowdstrike. The CRI-O community deeply thanks them for the report.
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.
{ "affected": [ { "package": { "ecosystem": "Go", "name": "github.com/cri-o/cri-o" }, "ranges": [ { "events": [ { "introduced": "1.19.0" }, { "fixed": "1.19.6" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/cri-o/cri-o" }, "ranges": [ { "events": [ { "introduced": "1.20.0" }, { "fixed": "1.20.7" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/cri-o/cri-o" }, "ranges": [ { "events": [ { "introduced": "1.21.0" }, { "fixed": "1.21.6" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/cri-o/cri-o" }, "ranges": [ { "events": [ { "introduced": "1.22.0" }, { "fixed": "1.22.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/cri-o/cri-o" }, "ranges": [ { "events": [ { "introduced": "1.23.0" }, { "fixed": "1.23.2" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2022-0811" ], "database_specific": { "cwe_ids": [ "CWE-94" ], "github_reviewed": true, "github_reviewed_at": "2022-03-15T20:13:38Z", "nvd_published_at": "2022-03-16T15:15:00Z", "severity": "HIGH" }, "details": "### Impact\nA flaw introduced in CRI-O version 1.19 which an attacker can use to bypass the safeguards and set arbitrary kernel parameters on the host. As a result, anyone with rights to deploy a pod on a Kubernetes cluster that uses the CRI-O runtime can abuse the `kernel.core_pattern` kernel parameter to achieve container escape and arbitrary code execution as root on any node in the cluster.\n\n### Patches\nThe patches will be present in 1.19.6, 1.20.7, 1.21.6, 1.22.3, 1.23.2, 1.24.0\n\n### Workarounds\n- 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\u0027t have this option.\n- An admission webhook could be created to deny pods that specify a `+` in the sysctl value of a pod.\n- A [PodSecurityPolicy](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#podsecuritypolicy) [deprecated] could be created, specifying all sysctls as forbidden like so: \n```\napiVersion: policy/v1beta1\nkind: PodSecurityPolicy\nmetadata:\n name: sysctl-psp\nspec:\n forbiddenSysctls:\n - \"*\"\n```\nHowever, this option will not work if any sysctls are required by any pods in the cluster.\n\n\n### Credits\nCredit for finding this vulnerability goes to John Walker and Manoj Ahuje of Crowdstrike. The CRI-O community deeply thanks them for the report.\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", "id": "GHSA-6x2m-w449-qwx7", "modified": "2022-03-18T17:47:49Z", "published": "2022-03-15T20:13:38Z", "references": [ { "type": "WEB", "url": "https://github.com/cri-o/cri-o/security/advisories/GHSA-6x2m-w449-qwx7" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-0811" }, { "type": "WEB", "url": "https://access.redhat.com/security/cve/CVE-2022-0811" }, { "type": "WEB", "url": "https://bugs.gentoo.org/835336" }, { "type": "WEB", "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2059475" }, { "type": "PACKAGE", "url": "https://github.com/cri-o/cri-o" }, { "type": "WEB", "url": "https://www.crowdstrike.com/blog/cr8escape-zero-day-vulnerability-discovered-in-cri-o-container-engine-cve-2022-0811" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "type": "CVSS_V3" } ], "summary": "Code Injection in CRI-O" }
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.