CVE-2021-43816:
Unprivileged pod using `hostPath` can side-step active LSM when it is SELinux
8.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.37093%
CWE
Published
1/6/2022
Updated
2/3/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/containerd/containerd | go | >= 1.5.0, < 1.5.9 | 1.5.9 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability arises from improper SELinux labeling of hostPath-mounted files. The commit a731039 introduced WithRelabeledContainerMounts to explicitly relabel /etc/hosts, /etc/hostname, and /etc/resolv.conf. Before this fix, the WithMounts function (spec_linux.go) handled mount creation without this relabeling, and the containerSpec function (container_create_linux.go) did not include the relabeling step in the specOpts chain. These omissions allowed containers to relabel host files via hostPath mounts, leading to privilege escalation. The high confidence stems from the patch directly addressing these two code paths by adding the missing relabeling logic.