cve-2024-45310
Vulnerability from cvelistv5
Published
2024-09-03 19:07
Modified
2024-09-03 20:03
Summary
runc can be confused to create empty files/directories on the host
Impacted products
Vendor Product Version
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-09-03T20:03:16.275Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "url": "http://www.openwall.com/lists/oss-security/2024/09/03/1"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-45310",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-03T20:03:49.189600Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-03T20:03:57.256Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "runc",
          "vendor": "opencontainers",
          "versions": [
            {
              "status": "affected",
              "version": "\u003c 1.1.14"
            },
            {
              "status": "affected",
              "version": "\u003e= 1.2.0-rc-1, \u003c 1.2.0-rc.3"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "runc is a CLI tool for spawning and running containers according to the OCI specification. runc 1.1.13 and earlier, as well as 1.2.0-rc2 and earlier, can be tricked into creating empty files or directories in arbitrary locations in the host filesystem by sharing a volume between two containers and exploiting a race with `os.MkdirAll`. While this could be used to create empty files, existing files would not be truncated. An attacker must have the ability to start containers using some kind of custom volume configuration. Containers using user namespaces are still affected, but the scope of places an attacker can create inodes can be significantly reduced. Sufficiently strict LSM policies (SELinux/Apparmor) can also in principle block this attack -- we suspect the industry standard SELinux policy may restrict this attack\u0027s scope but the exact scope of protection hasn\u0027t been analysed. This is exploitable using runc directly as well as through Docker and Kubernetes. The issue is fixed in runc v1.1.14 and v1.2.0-rc3.\n\nSome workarounds are available. Using user namespaces restricts this attack fairly significantly such that the attacker can only create inodes in directories that the remapped root user/group has write access to. Unless the root user is remapped to an actual\nuser on the host (such as with rootless containers that don\u0027t use `/etc/sub[ug]id`), this in practice means that an attacker would only be able to create inodes in world-writable directories. A strict enough SELinux or AppArmor policy could in principle also restrict the scope if a specific label is applied to the runc runtime, though neither the extent to which the standard existing policies block this attack nor what exact policies are needed to sufficiently restrict this attack have been thoroughly tested."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "LOCAL",
            "availabilityImpact": "NONE",
            "baseScore": 3.6,
            "baseSeverity": "LOW",
            "confidentialityImpact": "NONE",
            "integrityImpact": "LOW",
            "privilegesRequired": "NONE",
            "scope": "CHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-363",
              "description": "CWE-363: Race Condition Enabling Link Following",
              "lang": "en",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "cweId": "CWE-61",
              "description": "CWE-61: UNIX Symbolic Link (Symlink) Following",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-09-03T19:07:34.060Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/opencontainers/runc/security/advisories/GHSA-jfvp-7x6p-h2pv",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/opencontainers/runc/security/advisories/GHSA-jfvp-7x6p-h2pv"
        },
        {
          "name": "https://github.com/opencontainers/runc/pull/4359",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/opencontainers/runc/pull/4359"
        },
        {
          "name": "https://github.com/opencontainers/runc/commit/63c2908164f3a1daea455bf5bcd8d363d70328c7",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/opencontainers/runc/commit/63c2908164f3a1daea455bf5bcd8d363d70328c7"
        },
        {
          "name": "https://github.com/opencontainers/runc/commit/8781993968fd964ac723ff5f360b6f259e809a3e",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/opencontainers/runc/commit/8781993968fd964ac723ff5f360b6f259e809a3e"
        },
        {
          "name": "https://github.com/opencontainers/runc/commit/f0b652ea61ff6750a8fcc69865d45a7abf37accf",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/opencontainers/runc/commit/f0b652ea61ff6750a8fcc69865d45a7abf37accf"
        }
      ],
      "source": {
        "advisory": "GHSA-jfvp-7x6p-h2pv",
        "discovery": "UNKNOWN"
      },
      "title": "runc can be confused to create empty files/directories on the host"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2024-45310",
    "datePublished": "2024-09-03T19:07:34.060Z",
    "dateReserved": "2024-08-26T18:25:35.444Z",
    "dateUpdated": "2024-09-03T20:03:57.256Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-45310\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2024-09-03T19:15:15.243\",\"lastModified\":\"2024-11-21T09:37:39.410\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"runc is a CLI tool for spawning and running containers according to the OCI specification. runc 1.1.13 and earlier, as well as 1.2.0-rc2 and earlier, can be tricked into creating empty files or directories in arbitrary locations in the host filesystem by sharing a volume between two containers and exploiting a race with `os.MkdirAll`. While this could be used to create empty files, existing files would not be truncated. An attacker must have the ability to start containers using some kind of custom volume configuration. Containers using user namespaces are still affected, but the scope of places an attacker can create inodes can be significantly reduced. Sufficiently strict LSM policies (SELinux/Apparmor) can also in principle block this attack -- we suspect the industry standard SELinux policy may restrict this attack\u0027s scope but the exact scope of protection hasn\u0027t been analysed. This is exploitable using runc directly as well as through Docker and Kubernetes. The issue is fixed in runc v1.1.14 and v1.2.0-rc3.\\n\\nSome workarounds are available. Using user namespaces restricts this attack fairly significantly such that the attacker can only create inodes in directories that the remapped root user/group has write access to. Unless the root user is remapped to an actual\\nuser on the host (such as with rootless containers that don\u0027t use `/etc/sub[ug]id`), this in practice means that an attacker would only be able to create inodes in world-writable directories. A strict enough SELinux or AppArmor policy could in principle also restrict the scope if a specific label is applied to the runc runtime, though neither the extent to which the standard existing policies block this attack nor what exact policies are needed to sufficiently restrict this attack have been thoroughly tested.\"},{\"lang\":\"es\",\"value\":\"runc es una herramienta CLI para generar y ejecutar contenedores de acuerdo con la especificaci\u00f3n OCI. runc 1.1.13 y anteriores, as\u00ed como 1.2.0-rc2 y anteriores, pueden ser enga\u00f1ados para crear archivos o directorios vac\u00edos en ubicaciones arbitrarias en el sistema de archivos del host al compartir un volumen entre dos contenedores y explotar una ejecuci\u00f3n con `os.MkdirAll`. Si bien esto podr\u00eda usarse para crear archivos vac\u00edos, los archivos existentes no se truncar\u00edan. Un atacante debe tener la capacidad de iniciar contenedores utilizando alg\u00fan tipo de configuraci\u00f3n de volumen personalizada. Los contenedores que utilizan espacios de nombres de usuario a\u00fan se ven afectados, pero el alcance de los lugares en los que un atacante puede crear inodos se puede reducir significativamente. Las pol\u00edticas LSM suficientemente estrictas (SELinux/Apparmor) tambi\u00e9n pueden, en principio, bloquear este ataque; sospechamos que la pol\u00edtica SELinux est\u00e1ndar de la industria puede restringir el alcance de este ataque, pero no se ha analizado el alcance exacto de la protecci\u00f3n. Esto se puede explotar utilizando runc directamente, as\u00ed como a trav\u00e9s de Docker y Kubernetes. El problema se ha solucionado en runc v1.1.14 y v1.2.0-rc3. Hay algunos workarounds disponibles. El uso de espacios de nombres de usuario restringe este ataque de forma bastante significativa, de modo que el atacante solo puede crear inodos en directorios a los que el usuario o grupo ra\u00edz reasignado tiene acceso de escritura. A menos que el usuario ra\u00edz se reasigne a un usuario real en el host (como con contenedores sin ra\u00edz que no usan `/etc/sub[ug]id`), esto en la pr\u00e1ctica significa que un atacante solo podr\u00eda crear inodos en directorios con permisos de escritura para todo el mundo. Una pol\u00edtica de SELinux o AppArmor lo suficientemente estricta podr\u00eda, en principio, restringir tambi\u00e9n el alcance si se aplica una etiqueta espec\u00edfica al entorno de ejecuci\u00f3n de runc, aunque ni el grado en el que las pol\u00edticas est\u00e1ndar existentes bloquean este ataque ni qu\u00e9 pol\u00edticas exactas se necesitan para restringirlo lo suficiente se han probado exhaustivamente.runc es una herramienta CLI para generar y ejecutar contenedores de acuerdo con la especificaci\u00f3n OCI. runc 1.1.13 y anteriores, as\u00ed como 1.2.0-rc2 y anteriores, pueden ser enga\u00f1ados para crear archivos o directorios vac\u00edos en ubicaciones arbitrarias en el sistema de archivos del host al compartir un volumen entre dos contenedores y explotar una ejecuci\u00f3n con `os.MkdirAll`. Si bien esto podr\u00eda usarse para crear archivos vac\u00edos, los archivos existentes no se truncar\u00edan. Un atacante debe tener la capacidad de iniciar contenedores utilizando alg\u00fan tipo de configuraci\u00f3n de volumen personalizada. Los contenedores que utilizan espacios de nombres de usuario a\u00fan se ven afectados, pero el alcance de los lugares en los que un atacante puede crear inodos se puede reducir significativamente. Las pol\u00edticas LSM suficientemente estrictas (SELinux/Apparmor) tambi\u00e9n pueden, en principio, bloquear este ataque; sospechamos que la pol\u00edtica SELinux est\u00e1ndar de la industria puede restringir el alcance de este ataque, pero no se ha analizado el alcance exacto de la protecci\u00f3n. Esto se puede explotar utilizando runc directamente, as\u00ed como a trav\u00e9s de Docker y Kubernetes. El problema se ha solucionado en runc v1.1.14 y v1.2.0-rc3. Hay algunos workarounds disponibles. El uso de espacios de nombres de usuario restringe este ataque de forma bastante significativa, de modo que el atacante solo puede crear inodos en directorios a los que el usuario o grupo ra\u00edz reasignado tiene acceso de escritura. A menos que el usuario ra\u00edz se reasigne a un usuario real en el host (como con contenedores sin ra\u00edz que no usan `/etc/sub[ug]id`), esto en la pr\u00e1ctica significa que un atacante solo podr\u00eda crear inodos en directorios con permisos de escritura para todo el mundo. --- truncado -----\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N\",\"baseScore\":3.6,\"baseSeverity\":\"LOW\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"REQUIRED\",\"scope\":\"CHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"NONE\"},\"exploitabilityScore\":1.8,\"impactScore\":1.4}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-61\"},{\"lang\":\"en\",\"value\":\"CWE-363\"}]}],\"references\":[{\"url\":\"https://github.com/opencontainers/runc/commit/63c2908164f3a1daea455bf5bcd8d363d70328c7\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/opencontainers/runc/commit/8781993968fd964ac723ff5f360b6f259e809a3e\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/opencontainers/runc/commit/f0b652ea61ff6750a8fcc69865d45a7abf37accf\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/opencontainers/runc/pull/4359\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/opencontainers/runc/security/advisories/GHSA-jfvp-7x6p-h2pv\",\"source\":\"security-advisories@github.com\"},{\"url\":\"http://www.openwall.com/lists/oss-security/2024/09/03/1\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.