CVE-2021-43816Improper Preservation of Permissions in containerd
containerd is an open source container runtime. On installations using SELinux, such as EL8 (CentOS, RHEL), Fedora, or SUSE MicroOS, with containerd since v1.5.0-beta.0 as the backing container runtime interface (CRI), an unprivileged pod scheduled to the node may bind mount, via hostPath volume, any privileged, regular file on disk for complete read/write access (sans delete). Such is achieved by placing the in-container location of the hostPath volume mount at either `/etc/hosts`, `/etc/hostname`, or `/etc/resolv.conf`. These locations are being relabeled indiscriminately to match the container process-label which effectively elevates permissions for savvy containers that would not normally be able to access privileged host files. This issue has been resolved in version 1.5.9. Users are advised to upgrade as soon as possible.
What to do
Fixed builds are available from Alpine, Debian, Go, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | containerd | Fixed | 1.5.9-0ubuntu1 | UBUNTU-CVE-2021-43816 |
| Ubuntu 20.04 | containerd | Fixed | 1.5.9-0ubuntu1~20.04.4 | UBUNTU-CVE-2021-43816 |
| Ubuntu 18.04 | containerd | Fixed | 1.5.9-0ubuntu1~18.04.1 | UBUNTU-CVE-2021-43816 |
| Ubuntu 16.04 | containerd | Fix pending | UBUNTU-CVE-2021-43816 | |
| Debian 14 | containerd | Fixed | 1.5.9~ds1-1 | DEBIAN-CVE-2021-43816 |
| Debian 13 | containerd | Fixed | 1.5.9~ds1-1 | DEBIAN-CVE-2021-43816 |
| Debian 12 | containerd | Fixed | 1.5.9~ds1-1 | DEBIAN-CVE-2021-43816 |
| Alpine Linux 3.24 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Alpine Linux 3.23 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Alpine Linux 3.22 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Alpine Linux 3.21 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Alpine Linux 3.20 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Alpine Linux 3.19 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Alpine Linux 3.18 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Alpine Linux 3.17 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Alpine Linux 3.16 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Alpine Linux 3.15 | containerd | Fixed | 1.5.9-r0 | ALPINE-CVE-2021-43816 |
| Go library | github.com/containerd/containerd | Fixed | 1.5.9 | GO-2022-0278 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- containerd: affected: >= 1.5.0, < 1.5.9
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- https://github.com/containerd/containerd/security/advisories/GHSA-mvff-h3cj-wj9c
- https://github.com/containerd/containerd/issues/6194
- https://github.com/containerd/containerd/commit/a731039238c62be081eb8c31525b988415745eea
- https://github.com/dweomer/containerd/commit/f7f08f0e34fb97392b0d382e58916d6865100299
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GD5GH7NMK5VJMA2Y5CYB5O5GTPYMWMLX/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MPDIZMI7ZPERSZE2XO265UCK5IWM7CID/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.