containerd is a container runtime. A bug was found in containerd versions prior to 1.4.8 and 1.5.4 where pulling and extracting a…
GitHub_M·CWE-668·Published 2021-07-19
containerd is a container runtime. A bug was found in containerd versions prior to 1.4.8 and 1.5.4 where pulling and extracting a specially-crafted container image can result in Unix file permission changes for existing files in the host’s filesystem. Changes to file permissions can deny access to the expected owner of the file, widen access to others, or set extended bits like setuid, setgid, and sticky. This bug does not directly allow files to be read, modified, or executed without an additional cooperating process. This bug has been fixed in containerd 1.5.4 and 1.4.8. As a workaround, ensure that users only pull images from trusted sources. Linux security modules (LSMs) like SELinux and AppArmor can limit the files potentially affected by this bug through policies and profiles that prevent containerd from interacting with specific files.
containerd is a container runtime. A bug was found in containerd versions prior to 1.4.8 and 1.5.4 where pulling and extracting a specially-crafted container image can result in Unix file permission changes for existing files in the host’s filesystem. Changes to file permissions can deny access to the expected owner of the file, widen access to others, or set extended bits like setuid, setgid, and sticky. This bug does not directly allow files to be read, modified, or executed without an additional cooperating process. This bug has been fixed in containerd 1.5.4 and 1.4.8. As a workaround, ensure that users only pull images from trusted sources. Linux security modules (LSMs) like SELinux and AppArmor can limit the files potentially affected by this bug through policies and profiles that prevent containerd from interacting with specific files.
Archive package allows chmod of file outside of unpack target directory in github.com/containerd/containerd
## Impact A bug was found in containerd where pulling and extracting a specially-crafted container image can result in Unix file permission changes for existing files in the host’s filesystem. Changes to file permissions can deny access to the expected owner of the file, widen access to others, or set extended bits like setuid, setgid, and sticky. This bug does not directly allow files to be read, modified, or executed without an additional cooperating process. ## Patches This bug has been fixed in containerd 1.5.4 and 1.4.8. Users should update to these versions as soon as they are released. Running containers do not need to be restarted. ## Workarounds Ensure you only pull images from trusted sources. Linux security modules (LSMs) like SELinux and AppArmor can limit the files potentially affected by this bug through policies and profiles that prevent containerd from interacting with unexpected files. ## For more information If you have any questions or comments about this advisory: * [Open an issue](https://github.com/containerd/containerd/issues/new/choose) * Email us at security@containerd.io if you think you’ve found a security bug.
containerd es un tiempo de ejecución de contenedores. Se ha encontrado un bug en las versiones de containerd anteriores a 1.4.8 y la 1.5.4, donde tirando y extrayendo una imagen de contenedor especialmente diseñada puede resultar en cambios en los permisos de archivos Unix para los archivos existentes en el sistema de archivos del host. Los cambios en los permisos de los archivos pueden denegar el acceso al propietario esperado del archivo, ampliar el acceso a otros, o establecer bits extendidos como setuid, setgid y sticky. Este bug no permite directamente la lectura, modificación o ejecución de archivos sin un proceso adicional de cooperación. Este bug ha sido corregido en containerd versiones 1.5.4 y 1.4.8. Como solución, asegúrese de que los usuarios sólo obtienen imágenes de fuentes de confianza. Los módulos de seguridad de Linux (LSM) como SELinux y AppArmor pueden limitar los archivos potencialmente afectados por este bug mediante políticas y perfiles que impiden que containerd interactúe con archivos específicos
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 2.0 | Primary | NVD | 6.8 | 8.6 | 6.4 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
| 3.1 | Primary | NVD | 6.3 | 2.8 | 3.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L |
| 3.1 | Primary | cve.org | 5.0 | — | — | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
| 3.1 | Primary | cve.org | 5.0 | — | — | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
| 3.1 | Secondary | NVD | 5.0 | 1.6 | 3.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
| 3.1 | Secondary | GHSA | 5.0 | — | — | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |