Vulnerability · Published Mar 24, 2022 · Assigned by GitHub_M
CVE-2022-24769Default inheritable capabilities for linux container should be empty
Medium 5.9
In plain English
A medium-severity incorrect permission assignment in moby from moby. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 42% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Moby is an open-source project created by Docker to enable and accelerate software containerization. A bug was found in Moby (Docker Engine) prior to version 20.10.14 where containers were incorrectly started 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)`. Normally, when executable programs have specified permitted file capabilities, otherwise unprivileged users and processes can execute those programs and gain the specified file capabilities up to the bounding set. Due to this bug, containers which included executable programs with inheritable file capabilities allowed otherwise unprivileged users and processes to additionally gain these inheritable file capabilities up to the container's bounding set. Containers which use Linux users and groups to perform privilege separation inside the container are most directly impacted. This 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. This bug has been fixed in Moby (Docker Engine) 20.10.14. Running containers should be stopped, deleted, and recreated for the inheritable capabilities to be reset. This fix changes Moby (Docker Engine) behavior such that containers are started with a more typical Linux environment. As a workaround, the entry point of a container can be modified to use a utility like `capsh(1)` to drop inheritable capabilities prior to the primary process starting.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | containerd | 1.6.2-r0 | ALPINE-CVE-2022-24769 |
| Alpine:v3.21 | containerd | 1.6.2-r0 | ALPINE-CVE-2022-24769 |
| Alpine:v3.22 | containerd | 1.6.2-r0 | ALPINE-CVE-2022-24769 |
| Alpine:v3.23 | containerd | 1.6.2-r0 | ALPINE-CVE-2022-24769 |
| Alpine:v3.24 | containerd | 1.6.2-r0 | ALPINE-CVE-2022-24769 |
| Alpine:v3.20 | docker | 20.10.14-r0 | ALPINE-CVE-2022-24769 |
| Alpine:v3.21 | docker | 20.10.14-r0 | ALPINE-CVE-2022-24769 |
| Alpine:v3.22 | docker | 20.10.14-r0 | ALPINE-CVE-2022-24769 |
| Alpine:v3.23 | docker | 20.10.14-r0 | ALPINE-CVE-2022-24769 |
| Alpine:v3.24 | docker | 20.10.14-r0 | ALPINE-CVE-2022-24769 |
| Debian:12 | containerd | 1.6.2~ds1-1 | DEBIAN-CVE-2022-24769 |
| Debian:13 | containerd | 1.6.2~ds1-1 | DEBIAN-CVE-2022-24769 |
| Debian:14 | containerd | 1.6.2~ds1-1 | DEBIAN-CVE-2022-24769 |
| Go | github.com/docker/docker | 20.10.14 | GHSA-2mm7-x5h6-5pvq |
| Go | github.com/docker/docker | 20.10.14+incompatible | GO-2022-0390 |
| Go | github.com/moby/moby | 20.10.14+incompatible | GO-2022-0390 |
| Go | github.com/moby/moby | 20.10.14 | GHSA-2mm7-x5h6-5pvq |
| Ubuntu:22.04:LTS | containerd | 1.5.9-0ubuntu3.1 | UBUNTU-CVE-2022-24769 |
| Ubuntu:22.04:LTS | containerd | 1.5.9-0ubuntu3.1 | USN-5776-1 |
Affected products (as reported)
Weakness: CWE-732 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
References
- https://github.com/moby/moby/security/advisories/GHSA-2mm7-x5h6-5pvq
- https://github.com/moby/moby/commit/2bbc786e4c59761d722d2d1518cd0a32829bc07f
- https://github.com/moby/moby/releases/tag/v20.10.14
- FEDORA-2022-e9a09c1a7d vendor-advisory
- FEDORA-2022-ed53f2439a vendor-advisory
- FEDORA-2022-c07546070d vendor-advisory
- FEDORA-2022-cac2323802 vendor-advisory
- FEDORA-2022-eda0049dd7 vendor-advisory
- FEDORA-2022-3826c8f549 vendor-advisory
- [oss-security] 20220512 CVE-2022-29162: runc < 1.1.2 incorrect handling of inheritable capabilities in default configuration mailing-list
- DSA-5162 vendor-advisory
- GLSA-202401-31 vendor-advisory