# CVE-2016-9962: Information Exposure in RunC

> Attackers can exploit a race condition in runc exec to escape containers or modify runtime state by ptracing processes during initialization.

- **Severity:** Medium 6.4 (`CVSS:3.0/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 31 Jan 2017
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2016-9962, GHSA-gp4j-w3vj-7299, GO-2022-0835, MGASA-2017-0189, RHSA-2017:0116, RHSA-2017:0123, RHSA-2017:0127, SUSE-SU-2017:1964-1, UBUNTU-CVE-2016-9962

## What is CVE-2016-9962?

CVE-2016-9962 is a medium-severity vulnerability in n/a, published on 31 Jan 2017. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

RunC allowed additional container processes via 'runc exec' to be ptraced by the pid 1 of the container.  This allows the main processes of the container, if running as root, to gain access to file-descriptors of these new processes during the initialization and can lead to container escapes or modification of runC state before the process is fully placed inside the container.

Weakness: CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization)

## Which versions are affected by CVE-2016-9962?

3 open source packages ship an affected version, including github.com/opencontainers/runc. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/opencontainers/runc` | Go | All versions | 1.0.0-rc3 |
| `github.com/opencontainers/runc` | Go | All versions | 1.0.0-rc3 |
| `github.com/opencontainers/runc` | Go | All versions | 1.0.0-rc3 |
| `container-selinux` | Red Hat:rhel_extras_other:7 | All versions | 2:1.12.5-14.el7 |
| `docker` | Red Hat:rhel_extras_other:7 | All versions | 2:1.12.5-14.el7 |
| `docker-client` | Red Hat:rhel_extras_other:7 | All versions | 2:1.12.5-14.el7 |
| `docker-client-latest` | Red Hat:rhel_extras_other:7 | All versions | 0:1.12.5-14.el7 |
| `docker-common` | Red Hat:rhel_extras_other:7 | All versions | 2:1.12.5-14.el7 |
| `docker-latest` | Red Hat:rhel_extras_other:7 | All versions | 0:1.12.5-14.el7 |
| `docker-latest-logrotate` | Red Hat:rhel_extras_other:7 | All versions | 0:1.12.5-14.el7 |
| `docker-latest-v1.10-migrator` | Red Hat:rhel_extras_other:7 | All versions | 0:1.12.5-14.el7 |
| `docker-logrotate` | Red Hat:rhel_extras_other:7 | All versions | 2:1.12.5-14.el7 |
| `docker-lvm-plugin` | Red Hat:rhel_extras_other:7 | All versions | 2:1.12.5-14.el7 |
| `docker-novolume-plugin` | Red Hat:rhel_extras_other:7 | All versions | 2:1.12.5-14.el7 |
| `docker-rhel-push-plugin` | Red Hat:rhel_extras_other:7 | All versions | 2:1.12.5-14.el7 |
| `docker-v1.10-migrator` | Red Hat:rhel_extras_other:7 | All versions | 2:1.12.5-14.el7 |
| `runc` | Red Hat:rhel_extras_other:7 | All versions | 0:1.0.0-1.rc2.el7 |
| `containerd` | SUSE:Linux Enterprise Module for Containers 12 | All versions | 0.2.5+gitr569_2a5e70c-15.3 |
| `docker` | SUSE:Linux Enterprise Module for Containers 12 | All versions | 1.12.6-87.2 |
| `runc` | SUSE:Linux Enterprise Module for Containers 12 | All versions | 0.1.1+gitr2819_50a19c6-15.2 |
| `containerd` | SUSE:OpenStack Cloud 6 | All versions | 0.2.5+gitr569_2a5e70c-15.3 |
| `docker` | SUSE:OpenStack Cloud 6 | All versions | 1.12.6-87.2 |
| `runc` | SUSE:OpenStack Cloud 6 | All versions | 0.1.1+gitr2819_50a19c6-15.2 |

Products: Docker Docker.

## How do I fix CVE-2016-9962?

Upgrade github.com/opencontainers/runc to 1.0.0-rc3 or later.

## Is CVE-2016-9962 being exploited?

There is no known exploitation of CVE-2016-9962 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2014-9357](https://insights.sbomify.com/CVE-2014-9357/): Arbitrary Code Execution (critical 10.0)
- [CVE-2020-14298](https://insights.sbomify.com/CVE-2020-14298/): Privilege escalation in Docker (high 8.8)
- [CVE-2020-14300](https://insights.sbomify.com/CVE-2020-14300/): Privilege escalation in Docker (high 8.8)
- [CVE-2018-15514](https://insights.sbomify.com/CVE-2018-15514/): Deserialization in n/a (high 8.8)
- [CVE-2014-9356](https://insights.sbomify.com/CVE-2014-9356/): Path Traversal in Docker (high 8.6)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2016-9962 and fix it if it is affected.

What it is: CVE-2016-9962 is a medium-severity vulnerability in n/a, published on 31 Jan 2017. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2016-9962 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/opencontainers/runc (Go): affected all versions; fixed in 1.0.0-rc3
- github.com/opencontainers/runc (Go): affected all versions; fixed in 1.0.0-rc3
- github.com/opencontainers/runc (Go): affected all versions; fixed in 1.0.0-rc3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2016-9962/ (Markdown: https://insights.sbomify.com/CVE-2016-9962/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2016-9962
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2016-9962
- OSV: https://osv.dev/vulnerability/CVE-2016-9962

---
From sbomify Insights: https://insights.sbomify.com/CVE-2016-9962/
Summaries are generated and may contain mistakes; the official description above is the record.
