GHSA-jq35-85cj-fj4p: Github.com/docker/docker /sys/devices/virtual/powercap Accessible By Default To Vulnerability

MODERATE
Published
Advisory Summary

GHSA-jq35-85cj-fj4p is a MODERATE /sys/devices/virtual/powercap accessible by default to vulnerability (General Security Weakness) affecting Github.com/docker/docker libraries in the Go ecosystem. The issue involves /sys/devices/virtual/powercap accessible by default to containers. Remediation is available by upgrading affected packages to version 24.0.7, 23.0.8, 20.10.27.

GHSA-jq35-85cj-fj4p at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-jq35-85cj-fj4p
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Github.com/docker/docker
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-jq35-85cj-fj4p

To remediate this vulnerability, upgrade all affected Github.com/docker/docker dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/docker/docker fixed: 24.0.7
Upgrade github.com/docker/docker to 24.0.7
github.com/docker/docker fixed: 23.0.8
Upgrade github.com/docker/docker to 23.0.8
github.com/docker/docker fixed: 20.10.27
Upgrade github.com/docker/docker to 20.10.27
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/docker/docker

How to Check if You Are Affected

To determine whether your application is affected by GHSA-jq35-85cj-fj4p, inspect your project dependencies for Github.com/docker/docker:

inspect dependencies for github.com/docker/docker

Analyze the terminal output to locate any version of Github.com/docker/docker in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 24.0.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Github.com/docker/docker, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Intel's RAPL (Running Average Power Limit) feature, introduced by the Sandy Bridge microarchitecture, provides software insights into hardware energy consumption. To facilitate this, Intel introduced the powercap framework in Linux kernel 3.13, which reads values via relevant MSRs (model specific registers) and provides unprivileged userspace access via `sysfs`. As RAPL is an interface to access a hardware feature, it is only available when running on bare metal with the module compiled into the kernel. By 2019, it was realized that in some cases unprivileged access to RAPL readings could be exploited as a power-based side-channel against security features including AES-NI (potentially inside a SGX enclave) and KASLR (kernel address space layout randomization). Also known as the [PLATYPUS attack](https://platypusattack.com/), Intel assigned [CVE-2020-8694](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8694) and [CVE-2020-8695](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8695), and AMD assigned [CVE-2020-12912](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12912). Several mitigations were applied; Intel reduced the sampling resolution via a microcode update, and the Linux kernel [prevents access by non-root users](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=949dd0104c496fa7c14991a23c03c62e44637e71) since 5.10. However, this kernel-based mitigation does not apply to many container-based scenarios: * Unless using user namespaces, root inside a container has the same level of privilege as root outside the container, but with a slightly more narrow view of the system * `sysfs` is mounted inside containers read-only; however only read access is needed to carry out this attack on an unpatched CPU While this is not a direct vulnerability in container runtimes, defense in depth and safe defaults are valuable and preferred, especially as this poses a risk to multi-tenant container environments running directly on affected hardware. This is provided by masking `/sys/devices/virtual/powercap` in the default mount configuration, and adding an additional set of rules to deny it in the default AppArmor profile. While `sysfs` is not the only way to read from the RAPL subsystem, other ways of accessing it require additional capabilities such as `CAP_SYS_RAWIO` which is not available to containers by default, or `perf` paranoia level less than 1, which is a non-default kernel tunable. ## References * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8694 * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8695 * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12912 * https://platypusattack.com/ * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=949dd0104c496fa7c14991a23c03c62e44637e71 * https://web.eece.maine.edu/~vweaver/projects/rapl/

GHSA-jq35-85cj-fj4p Affected Github.com/docker/docker Versions

3 component(s)
Fixed Versions:
24.0.723.0.820.10.27
Product / Package Ecosystem Affected Versions Fixed Version
github.com/docker/docker
Go
≥ 24.0.0
< 24.0.7
24.0.7
github.com/docker/docker
Go
≥ 21.0.0
< 23.0.8
23.0.8
github.com/docker/docker
Go
< 20.10.27
20.10.27

References

Frequently Asked Questions

What is GHSA-jq35-85cj-fj4p?
GHSA-jq35-85cj-fj4p is a security vulnerability in Github.com/docker/docker involving /sys/devices/virtual/powercap accessible by default to containers under General Security Weakness.
Which Github.com/docker/docker versions are affected?
Affected versions include releases prior to 24.0.7, 23.0.8, 20.10.27 across affected packages: github.com/docker/docker.
What version fixes GHSA-jq35-85cj-fj4p?
Upgrading to 24.0.7, 23.0.8, 20.10.27 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/docker/docker affected?
Yes, github.com/docker/docker is affected in releases prior to 24.0.7, 23.0.8, 20.10.27. Upgrade your dependency to 24.0.7, 23.0.8, 20.10.27 or later.
What CWE is associated with GHSA-jq35-85cj-fj4p?
GHSA-jq35-85cj-fj4p is classified under General Security Weakness.
How can I check Go dependencies for GHSA-jq35-85cj-fj4p?
Run the dependency tree command: 'inspect dependencies for github.com/docker/docker'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jq35-85cj-fj4p",
  "modified" : "2023-10-30T15:25:44Z",
  "published" : "2023-10-30T15:25:44Z",
  "aliases" : [ ],
  "summary" : "/sys/devices/virtual/powercap accessible by default to containers",
  "details" : "Intel's RAPL (Running Average Power Limit) feature, introduced by the Sandy Bridge microarchitecture, provides software insights into hardware energy consumption. To facilitate this, Intel introduced the powercap framework in Linux kernel 3.13, which reads values via relevant MSRs (model specific registers) and provides unprivileged userspace access via `sysfs`. As RAPL is an interface to access a hardware feature, it is only available when running on bare metal with the module compiled into the kernel.\n\nBy 2019, it was realized that in some cases unprivileged access to RAPL readings could be exploited as a power-based side-channel against security features including AES-NI (potentially inside a SGX enclave) and KASLR (kernel address space layout randomization). Also known as the [PLATYPUS attack](https://platypusattack.com/), Intel assigned [CVE-2020-8694](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8694) and [CVE-2020-8695](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8695), and AMD assigned [CVE-2020-12912](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12912).\n\nSeveral mitigations were applied; Intel reduced the sampling resolution via a microcode update, and the Linux kernel [prevents access by non-root users](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=949dd0104c496fa7c14991a23c03c62e44637e71) since 5.10. However, this kernel-based mitigation does not apply to many container-based scenarios:\n* Unless using user namespaces, root inside a container has the same level of privilege as root outside the container, but with a slightly more narrow view of the system\n* `sysfs` is mounted inside containers read-only; however only read access is needed to carry out this attack on an unpatched CPU\n\nWhile this is not a direct vulnerability in container runtimes, defense in depth and safe defaults are valuable and preferred, especially as this poses a risk to multi-tenant container environments running directly on affected hardware. This is provided by masking `/sys/devices/virtual/powercap` in the default mount configuration, and adding an additional set of rules to deny it in the default AppArmor profile.\n\nWhile `sysfs` is not the only way to read from the RAPL subsystem, other ways of accessing it require additional capabilities such as `CAP_SYS_RAWIO` which is not available to containers by default, or `perf` paranoia level less than 1, which is a non-default kernel tunable.\n\n## References\n\n* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8694\n* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8695\n* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12912\n* https://platypusattack.com/\n* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=949dd0104c496fa7c14991a23c03c62e44637e71\n* https://web.eece.maine.edu/~vweaver/projects/rapl/",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/docker/docker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "24.0.0"
      }, {
        "fixed" : "24.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/docker/docker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.0.0"
      }, {
        "fixed" : "23.0.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/docker/docker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "20.10.27"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/moby/moby/security/advisories/GHSA-jq35-85cj-fj4p"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moby/moby/commit/48ebe353e49a9def5e6679f6e386b0efb1c95f0e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moby/moby/commit/81ebe71275768629689a23bc3bca34b3b374a6a6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moby/moby/commit/c9ccbfad11a60e703e91b6cca4f48927828c7e35"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/moby/moby"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moby/moby/releases/tag/v20.10.27"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moby/moby/releases/tag/v23.0.8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moby/moby/releases/tag/v24.0.7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-30T15:25:44Z",
    "nvd_published_at" : null
  }
}