Vulnerability · Published Dec 6, 2021 · Assigned by GitHub_M

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

Medium 6.0

In plain English

A medium-severity integer overflow in runc from opencontainers. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.8% (higher than 79% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.0Medium
Exploit odds (30 days)1.8%top 21.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:9runc4:1.1.9-1.el9ALSA-2023:6380
Alpine:v3.20runc1.0.3-r0ALPINE-CVE-2021-43784
Alpine:v3.21runc1.0.3-r0ALPINE-CVE-2021-43784
Alpine:v3.22runc1.0.3-r0ALPINE-CVE-2021-43784
Alpine:v3.23runc1.0.3-r0ALPINE-CVE-2021-43784
Alpine:v3.24runc1.0.3-r0ALPINE-CVE-2021-43784
Debian:12runc1.0.3+ds1-1DEBIAN-CVE-2021-43784
Debian:13runc1.0.3+ds1-1DEBIAN-CVE-2021-43784
Debian:14runc1.0.3+ds1-1DEBIAN-CVE-2021-43784
Gogithub.com/opencontainers/runc1.0.3GHSA-v95c-p5hm-xq8f
Gogithub.com/opencontainers/runc1.1.0GO-2022-0274

Affected products (as reported)

VendorProductVersions
opencontainers runc < 1.0.3

Weakness: CWE-190 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:L

References