opencontainers runc contains procfs race condition with a shared volume mountGHSA-fh74-hm69-rqjw
MEDIUMFix: opencontainers/runc#2190GHSA-fh74-hm69-rqjw is a medium-severity (CVSS 5.9) CWE-706 vulnerability in github.com/opencontainers/runc. A fix is available for github.com/opencontainers/runc — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-fh74-hm69-rqjw by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/opencontainers/runcReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
By crafting a malicious root filesystem (with /proc being a symlink to a directory which was inside a volume shared with another running container), an attacker in control of both containers can trick runc into not correctly configuring the container's security labels and not correctly masking paths inside /proc which contain potentially-sensitive information about the host (or even allow for direct attacks against the host).
In order to exploit this bug, an untrusted user must be able to spawn custom containers with custom mount configurations (such that a volume is shared between two containers). It should be noted that we consider this to be a fairly high level of access for an untrusted user -- and we do not recommend allowing completely untrusted users to have such degrees of access without further restrictions.
Specific Go Package Affected
github.com/opencontainers/runc/libcontainer
Patches
This vulnerability has been fixed in 1.0.0-rc10. It should be noted that the current fix is effectively a hot-fix, and there are known ways for it to be worked around (such as making the entire root filesystem a shared volume controlled by another container). We recommend that users review their access policies to ensure that untrusted users do not have such high levels of controls over container mount configuration.
Workarounds
If you are not providing the ability for untrusted users to configure mountpoints for runc (or through a higher-level tool such as docker run -v) then you are not vulnerable to this issue. This exploit requires fairly complicated levels of access (which are available for some public clouds but are not necessarily available for all deployments).
Additionally, it appears as though it is not possible to exploit this vulnerability through Docker (due to the order of mounts Docker generates). However you should not depend on this, as it may be possible to work around this roadblock.
Credits
This vulnerability was discovered by Cure53, as part of a third-party security audit.
For more information
If you have any questions or comments about this advisory:
- Open an issue.
- Email us at [email protected], or [email protected] if you think you've found a security bug.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/opencontainers/runc | all versions | 1.0.0-rc9.0.20200122160610-2fc03cc11c77go get github.com/opencontainers/runc@v1.0.0-rc9.0.20200122160610-2fc03cc11c77 |
Affected Products
ubuntu linuxcanonicaldebian linuxdebianrunclinuxfoundationleapopensuseopenshift container platformredhatDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/opencontainers/runc, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/opencontainers/runc to 1.0.0-rc9.0.20200122160610-2fc03cc11c77 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fh74-hm69-rqjw is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
For Red Hat OpenStack Platform, because runc is not directly used by the director-operator, no update will be provided at this time for the operator containers.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 7 Extras | runc-0:1.0.0-66.rc8.el7_7 | RHSA-2020:0942 |
| Red Hat Enterprise Linux 8 | container-tools:rhel8-8020020200324071414.0d58ad57 | RHSA-2020:1650 |
| Red Hat OpenShift Container Platform 4.1 | runc-0:1.0.0-63.rc8.rhaos4.1.git3cbe540.el8_0 | RHSA-2020:0695 |
| Red Hat OpenShift Container Platform 4.2 | runc-0:1.0.0-63.rc10.rhaos4.2.gitdc9208a.el8 | RHSA-2020:0688 |
| Red Hat OpenShift Container Platform 4.3 | runc-0:1.0.0-66.rc10.rhaos4.3.el7_8 | RHSA-2020:1485 |
Frequently Asked Questions
Is GHSA-fh74-hm69-rqjw in your dependencies?
Find it across Go, including transitive dependencies.