Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Overflow in netlink bytemsg length field allows attacker to override netlink-based container configuration

CVSS 3.1 6.0 MEDIUMEUVD CVSS 3.1 6.0 CVSS 3.1 · [email protected] · Secondary 6.0 MEDIUMCVSS 3.1 · [email protected] · Primary 5.0 MEDIUMCVSS 2.0 · [email protected] · Primary 6.0 MEDIUMCVSS_V3 Publisher rating MODERATEFixed by github.com/opencontainers/runc 1.0.3osv · severity unknownFixed by github.com/opencontainers/runc 1.1.0KEV status unknown

cve-program · CVE-2021-43784

Published

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.

Read the publisher's advisory

euvd · EUVD-2021-2591

Published

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.

Read the publisher's advisory

nvd · CVE-2021-43784

Published

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.

Read the publisher's advisory

osv · GHSA-v95c-p5hm-xq8f

Published

### Impact In runc, [netlink](https://www.man7.org/linux/man-pages/man7/netlink.7.html) is used internally as a serialization system for specifying the relevant container configuration to the C portion of our 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. Prior to 9c444070ec7bb83995dbc0185da68284da71c554, in practice it was fairly difficult to specify an arbitrary-length netlink message with most container runtimes. The only user-controlled byte array was the namespace paths attributes which can be specified in runc's `config.json`, but as far as we can tell no container runtime gives raw access to that configuration setting -- and having raw access to that setting **would allow the attacker to disable namespace protections entirely anyway** (setting them to `/proc/1/ns/...` for instance). In addition, each namespace path is limited to 4096 bytes (with only 7 namespaces supported by runc at the moment) meaning that even with custom namespace paths it appears an attacker still cannot shove enough bytes into the netlink bytemsg in order to overflow the uint16 counter. However, out of an abundance of caution (given how old this bug is) we decided to treat it as a potentially exploitable vulnerability with a low severity. After 9c444070ec7bb83995dbc0185da68284da71c554 (which was not present in any release of runc prior to the discovery of this bug), all mount paths are included as a giant netlink message which means that this bug becomes significantly more exploitable in more reasonable threat scenarios. The main users impacted are those who allow untrusted images with untrusted configurations to run on their machines (such as with shared cloud infrastructure), though as mentioned above it appears this bug was not practically exploitable on any released version of runc to date. ### Patches The patch for this is d72d057ba794164c3cce9451a00b72a78b25e1ae and runc 1.0.3 was released with this bug fixed. ### Workarounds To the extent this is exploitable, disallowing untrusted namespace paths in container configuration should eliminate all practical ways of exploiting this bug. It should be noted that untrusted namespace paths would allow the attacker to disable namespace protections entirely even in the absence of this bug. ### References * commit d72d057ba794 ("runc init: avoid netlink message length overflows") * https://bugs.chromium.org/p/project-zero/issues/detail?id=2241 ### Credits Thanks to Felix Wilhelm from Google Project Zero for discovering and reporting this vulnerability. In particular, the fact they found this vulnerability so quickly, before we made a 1.1 release of runc (which would've been vulnerable) was quite impressive. ### For more information If you have any questions or comments about this advisory: * Open an issue in [our repo](https://github.com/opencontainers/runc)

Read the publisher's advisory

osv · GO-2022-0274

Published

An attacker with partial control over the bind mount sources of a new container can bypass namespace restrictions.

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2021-43784

Published

runc

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "opencontainers",
                    "product": "runc",
                    "versions": [
                        {
                            "version": "< 1.0.3",
                            "status": "affected"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2021-2591

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Dec 6, 2021, 12:00:00 AM

dateUpdated: Oct 15, 2024, 5:14:20 PM

7 related source bulletins · separate from aliases

openSUSE-SU-2021:1625-1: Security update for runc

CVE-2021-43784

openSUSE-SU-2021:4171-1: Security update for runc

CVE-2021-43784

RHSA-2023:6380: Red Hat Security Advisory: runc security update

CVE-2021-43784 · CVE-2022-41724 · CVE-2023-25809 · CVE-2023-27561 · CVE-2023-28642

SUSE-SU-2021:4171-1: Security update for runc

CVE-2021-43784

openSUSE-SU-2024:11664-1: runc-1.0.3-1.1 on GA media

CVE-2021-43784

msrc_CVE-2021-43784: Overflow in netlink bytemsg length field allows attacker to override netlink-based container configuration

CVE-2021-43784

SUSE-SU-2021:4059-1: Security update for runc

CVE-2021-43784

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2021-43784

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Modified

Weakness classifications: CWE-190

Original publisher date fields

published: 2021-12-06T18:15:08.240

lastModified: 2026-06-17T04:11:25.983

2 source CPE criteria · context only
  • cpe:2.3:a:linuxfoundation:runc:*:*:*:*:*:*:*:*
  • cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*

The original JSON retains the logical configuration operators, exclusions and version bounds.

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-v95c-p5hm-xq8f

Published

github.com/opencontainers/runc

Go

SEMVER · introduced 0 → fixed 1.0.3

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GO-2022-0274

Published

github.com/opencontainers/runc

Go

SEMVER · introduced 1.0.1-0.20211012131345-9c444070ec7b → fixed 1.1.0

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 19 Nov 05:53 UTC · 273 of 275 readable · 269 fully read · documentation 469/469 current