Vulnerability · Published Dec 7, 2022 · Assigned by GitHub_M
CVE-2022-23471containerd CRI stream server: Host memory exhaustion through terminal resize goroutine leak
Medium 5.7
In plain English
A medium-severity uncontrolled resource consumption in containerd from containerd. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 66% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
containerd is an open source container runtime. A bug was found in containerd's CRI implementation where a user can exhaust memory on the host. In the CRI stream server, a goroutine is launched to handle terminal resize events if a TTY is requested. If the user's process fails to launch due to, for example, a faulty command, the goroutine will be stuck waiting to send without a receiver, resulting in a memory leak. Kubernetes and crictl can both be configured to use containerd's CRI implementation and the stream server is used for handling container IO. This bug has been fixed in containerd 1.6.12 and 1.5.16. Users should update to these versions to resolve the issue. Users unable to upgrade should ensure that only trusted images and commands are used and that only trusted users have permissions to execute commands in running containers.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | containerd | 1.6.12-r0 | ALPINE-CVE-2022-23471 |
| Alpine:v3.21 | containerd | 1.6.12-r0 | ALPINE-CVE-2022-23471 |
| Alpine:v3.22 | containerd | 1.6.12-r0 | ALPINE-CVE-2022-23471 |
| Alpine:v3.23 | containerd | 1.6.12-r0 | ALPINE-CVE-2022-23471 |
| Alpine:v3.24 | containerd | 1.6.12-r0 | ALPINE-CVE-2022-23471 |
| Debian:12 | containerd | 1.6.12~ds1-1 | DEBIAN-CVE-2022-23471 |
| Debian:13 | containerd | 1.6.12~ds1-1 | DEBIAN-CVE-2022-23471 |
| Debian:14 | containerd | 1.6.12~ds1-1 | DEBIAN-CVE-2022-23471 |
| Go | github.com/containerd/containerd | 1.6.12 | GHSA-2qjp-425j-52j9 |
| Go | github.com/containerd/containerd | 1.5.16, 1.6.12 | GO-2022-1147 |
| Go | github.com/containerd/containerd | 1.5.16 | GHSA-2qjp-425j-52j9 |
| Ubuntu:22.04:LTS | containerd | 1.5.9-0ubuntu3.1 | UBUNTU-CVE-2022-23471 |
| Ubuntu:22.04:LTS | containerd | 1.5.9-0ubuntu3.1 | USN-5776-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| containerd | containerd | < 1.5.16>= 1.6.0, < 1.6.12 |
Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H