5.7medium
containerd CRI stream server: Host memory exhaustion through terminal resize goroutine leak
- Severity
- 5.7medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.11% (higher than 66% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-2qjp-425j-52j9GO-2022-1147
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
| Product or package | Versions | Reported by |
|---|---|---|
| containerd containerd | < 1.5.16, >= 1.6.0, < 1.6.12 | CVE List |
| github.com/containerd/containerd (Go) | before 1.5.16, from 1.6.0 before 1.6.12 | GitHub Advisory Database, Go Vulnerability Database |
| linuxfoundation containerd | before 1.5.16, from 1.6.0 before 1.6.12 | NVD |
All scores
| GitHub_M | 5.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H |
| GitHub | 5.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Impact
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.
Patches
This bug has been fixed in containerd 1.6.12 and 1.5.16. Users should update to these versions to resolve the issue.
Workarounds
Ensure that only trusted images and commands are used and that only trusted users have permissions to execute commands in running containers.
For more information
If you have any questions or comments about this advisory:
- Open an issue in containerd
- Email us at security@containerd.io
To report a security issue in containerd:
- Report a new vulnerability
- Email us at security@containerd.io
Go Vulnerability Database
containerd CRI stream server vulnerable to host memory exhaustion via terminal in github.com/containerd/containerd
NVD (es)
Containerd es un runtime de contenedor de código abierto. Se encontró un error en la implementación CRI de Containerd donde un usuario puede agotar la memoria en el host. En el servidor de transmisión CRI, se lanza una rutina para manejar eventos de cambio de tamaño del terminal si se solicita un TTY. Si el proceso del usuario no se inicia debido, por ejemplo, a un comando defectuoso, la rutina se atascará esperando enviarse sin un receptor, lo que provocará una pérdida de memoria. Tanto Kubernetes como crictl se pueden configurar para usar la implementación CRI de Containerd y el servidor de transmisión se usa para manejar la E/S del contenedor. Este error se solucionó en Containerd 1.6.12 y 1.5.16. Los usuarios deben actualizar a estas versiones para resolver el problema. Los usuarios que no puedan actualizar deben asegurarse de que solo se utilicen imágenes y comandos confiables y que solo los usuarios confiables tengan permisos para ejecutar comandos en contenedores en ejecución.
References
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-23471 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2qjp-425j-52j9 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-1147 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2022-23471 changed 2026-06-17 | Public domain |