Summary
devices resource list treated as a blacklist by default
Workarounds
If you are using runc directly, ensure that there is a deny-all entry at the beginning of linux.resources.devices -- such an entry would look like {"allow": false, "permissions": "rwm"} (all other fields are ignored, though type must be set to "a" or null if it is present).
Users which consume runc through another program should check whether their containers are operating under a white-list -- this can be done by reading /sys/fs/cgroup/devices/devices.list inside the container. If the file contains only the entry a *:* rwm (meaning the cgroup is in black-list mode, which likely means "allow all device access") then your containers are vulnerable to this issue.
As always, we recommend in the strongest possible terms that all of our users enable user namespaces on all of their workloads (or pressure their vendors to do so). User namespaces are one of the most significant defense-in-depth protections you can enable for containers, and have prevented many container-related vulnerabilities (both kernel 0days as well as bugs in container runtimes, such as this one).
References
- https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/devices.html
- opencontainers/runtime-spec/config-linux.md#device-whitelist
- https://github.com/opencontainers/runc/pull/2391
For more information
If you have any questions or comments about this advisory:
- Open an issue in this repo.
- Email us at [email protected].
Impact
Contrary to the OCI runtime specification, runc's implementation of the linux.resources.devices list was a black-list by default. This means that users who created their own config.json objects and didn't prefix a deny-all rule ({"allow": false, "permissions": "rwm"} or equivalent) were not provided protection by the devices cgroup. This would allow malicious containers (with sufficient privileges) to create arbitrary device inodes (assuming they have CAP_MKNOD) and operate on any device inodes they may have access to (assuming they have regular Unix DAC permissions).
However, most (if not all) programs that make use of runc include this deny-all rule. This was most likely added before the specification mandated a white-list of devices, and the fact that all programs wrote their own deny-all rule obscured the existence of this bug for several years. In fact, even the specification's examples include a default deny-all rule! We therefore believe that while this is a security bug (and has been fixed as such), it was almost certainly not exploitable in the wild due to the inclusion of default deny-all rules by all known users of runc -- hence why this advisory has low severity.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
This issue has been fixed in a patch that was part of a larger rework of the devices cgroup code in runc -- which lead to the discovery of this security bug. Users should upgrade to 1.0.0-rc91 as soon as it is released, or wait for your distribution to backport the relevant fixes.
Frequently Asked Questions
- What is GHSA-G54H-M393-CPWQ? GHSA-G54H-M393-CPWQ is a low-severity security vulnerability in github.com/opencontainers/runc (go), affecting versions <= 1.0.0-rc90. It is fixed in 1.0.0-rc91.
- Which versions of github.com/opencontainers/runc are affected by GHSA-G54H-M393-CPWQ? github.com/opencontainers/runc (go) versions <= 1.0.0-rc90 is affected.
- Is there a fix for GHSA-G54H-M393-CPWQ? Yes. GHSA-G54H-M393-CPWQ is fixed in 1.0.0-rc91. Upgrade to this version or later.
- Is GHSA-G54H-M393-CPWQ exploitable, and should I be worried? Whether GHSA-G54H-M393-CPWQ is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-G54H-M393-CPWQ is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-G54H-M393-CPWQ? Upgrade
github.com/opencontainers/runcto 1.0.0-rc91 or later.