CVE-2021-43784 Overflow in netlink bytemsg length field allows attacker to override netlink-based container configuration
An integer overflow in runc allows attackers with container configuration control to bypass namespace restrictions and escape the container.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-43784?
CVE-2021-43784 is a medium-severity vulnerability in Debian Debian Linux, published on 6 Dec 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
runc is a CLI tool for spawning and running containers on Linux according to the OCI specification. In runc, netlink is used internally as a serialization system for specifying the relevant container configuration to the `C` portion of the code (responsible for the based namespace setup of containers). In all versions of runc prior to 1.0.3, the encoder did not handle the possibility of an integer overflow in the 16-bit length field for the byte array attribute type, meaning that a large enough malicious byte array attribute could result in the length overflowing and the attribute contents being parsed as netlink messages for container configuration. This vulnerability requires the attacker to have some control over the configuration of the container and would allow the attacker to bypass the namespace restrictions of the container by simply adding their own netlink payload which disables all namespaces. The main users impacted are those who allow untrusted images with untrusted configurations to run on their machines (such as with shared cloud infrastructure). runc version 1.0.3 contains a fix for this bug. As a workaround, one may try disallowing untrusted namespace paths from your container. It should be noted that untrusted namespace paths would allow the attacker to disable namespace protections entirely even in the absence of this bug.
Weakness: CWE-190
Which versions are affected by CVE-2021-43784?
3 open source packages ship an affected version, including github.com/opencontainers/runc. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
github.com/opencontainers/runc Go | All versions | 1.0.3 |
github.com/opencontainers/runc Go | All versions | 1.0.3 |
github.com/opencontainers/runc Go | From 1.0.1-0.20211012131345-9c444070ec7b | 1.1.0 |
Linux distribution packages (9)
runc SUSE:Enterprise Storage 7 | All versions | 1.0.3-27.1 |
runc SUSE:Linux Enterprise Micro 5.0 | All versions | 1.0.3-27.1 |
runc SUSE:Linux Enterprise Micro 5.1 | All versions | 1.0.3-27.1 |
runc SUSE:Linux Enterprise Module for Containers 12 | All versions | 1.0.3-16.18.1 |
runc SUSE:Linux Enterprise Module for Containers 15 SP2 | All versions | 1.0.3-27.1 |
runc SUSE:Linux Enterprise Module for Containers 15 SP3 | All versions | 1.0.3-27.1 |
runc openSUSE:Leap 15.2 | All versions | 1.0.3-lp152.2.12.1 |
runc openSUSE:Leap 15.3 | All versions | 1.0.3-27.1 |
runc openSUSE:Tumbleweed | All versions | 1.0.3-1.1 |
Products include Debian Debian Linux, Linuxfoundation Runc.
How do I fix CVE-2021-43784?
Upgrade github.com/opencontainers/runc to a fixed version for your release line: 1.0.3 or 1.1.0.
Is CVE-2021-43784 being exploited?
There is no known exploitation of CVE-2021-43784 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as AZL-6682, CLEANSTART-2026-DZ88951, DEBIAN-CVE-2021-43784, DLA-2841-1, GHSA-v95c-p5hm-xq8f, GO-2022-0274 and 7 more.