CVE-2022-29162: Github.com/opencontainers/runc Default Inheritable Capabilities For Linux Vulnerability
MODERATECVE-2022-29162 is a MODERATE (CVSS 5.9) default inheritable capabilities for linux vulnerability (CWE-276: Incorrect Default Permissions) affecting Github.com/opencontainers/runc libraries in the Go ecosystem. The issue involves default inheritable capabilities for linux container should be empty. Remediation is available by upgrading affected packages to version 1.1.2.
CVE-2022-29162 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2022-29162
To remediate this vulnerability, upgrade all affected Github.com/opencontainers/runc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/opencontainers/runc to 1.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/opencontainers/runc
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-29162, inspect your project dependencies for Github.com/opencontainers/runc:
inspect dependencies for github.com/opencontainers/runc
Analyze the terminal output to locate any version of Github.com/opencontainers/runc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.2), 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-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. In Github.com/opencontainers/runc, 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
CVE-2022-29162 Affected Github.com/opencontainers/runc Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/opencontainers/runc
|
Go |
< 1.1.2
|
1.1.2
|
References
Frequently Asked Questions
What is CVE-2022-29162?
Which Github.com/opencontainers/runc versions are affected?
What version fixes CVE-2022-29162?
Is github.com/opencontainers/runc affected?
What is the CVSS score of CVE-2022-29162?
What CWE is associated with CVE-2022-29162?
How can I check Go dependencies for CVE-2022-29162?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f3fp-gc8g-vw66",
"modified" : "2023-03-27T22:23:50Z",
"published" : "2022-05-24T17:36:56Z",
"aliases" : [ "CVE-2022-29162" ],
"summary" : "Default inheritable capabilities for linux container should be empty",
"details" : "### Impact\n\nA bug was found in runc where `runc exec --cap` executed processes with non-empty inheritable Linux process capabilities, creating an atypical Linux environment and enabling programs with inheritable file capabilities to elevate those capabilities to the permitted set during execve(2).\n\nThis bug did not affect the container security sandbox as the inheritable set never contained more capabilities than were included in the container's bounding set.\n\n### Patches\nThis bug has been fixed in runc 1.1.2. Users should update to this version as soon as possible.\n\nThis fix changes `runc exec --cap` behavior such that the additional capabilities granted to the process being executed (as specified via `--cap` arguments) do not include inheritable capabilities.\n\nIn addition, `runc spec` is changed to not set any inheritable capabilities in the created example OCI spec (`config.json`) file.\n\n### Credits\nThe opencontainers project would like to thank [Andrew G. Morgan](https://github.com/AndrewGMorgan) for responsibly disclosing this issue in accordance with the [opencontainers org security policy](https://github.com/opencontainers/.github/blob/master/SECURITY.md).\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n* [Open an issue](https://github.com/opencontainers/runc/issues/new)\n* Email us at [security@opencontainers.org](mailto:security@opencontainers.org) if you think you’ve found a security bug",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/opencontainers/runc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/opencontainers/runc/security/advisories/GHSA-f3fp-gc8g-vw66"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-29162"
}, {
"type" : "WEB",
"url" : "https://github.com/opencontainers/runc/commit/d04de3a9b72d7a2455c1885fc75eb36d02cd17b5"
}, {
"type" : "WEB",
"url" : "https://github.com/opencontainers/runc/releases/tag/v1.1.2"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/03/msg00023.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AVPZBV7ISA7QKRPTC7ZXWKMIQI2HZEBB"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/D77CKD3AXPMU4PMQIQI5Q74SI4JATNND"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GPQU4YC4AAY54JDXGDQHJEYKSXXG5T2Y"
}, {
"type" : "PACKAGE",
"url" : "github.com/opencontainers/runc"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-276" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-05-24T17:36:56Z",
"nvd_published_at" : "2022-05-17T21:15:00Z"
}
}