cve-2024-40935
Vulnerability from cvelistv5
Published
2024-07-12 12:25
Modified
2024-11-05 09:33
Severity ?
Summary
cachefiles: flush all requests after setting CACHEFILES_DEAD
Impacted products
Vendor Product Version
Linux Linux Version: 5.19
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T04:39:55.674Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/320ba9cbca78be79c912143bbba1d1b35ca55cf0"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/3bf0b8030296e9ee60d3d4c15849ad9ac0b47081"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/e73fac95084839c5178d97e81c6a2051251bdc00"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/85e833cd7243bda7285492b0653c3abb1e2e757b"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-40935",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T17:04:46.320967Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:33:02.419Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/cachefiles/daemon.c",
            "fs/cachefiles/internal.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "320ba9cbca78",
              "status": "affected",
              "version": "c8383054506c",
              "versionType": "git"
            },
            {
              "lessThan": "3bf0b8030296",
              "status": "affected",
              "version": "c8383054506c",
              "versionType": "git"
            },
            {
              "lessThan": "e73fac950848",
              "status": "affected",
              "version": "c8383054506c",
              "versionType": "git"
            },
            {
              "lessThan": "85e833cd7243",
              "status": "affected",
              "version": "c8383054506c",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/cachefiles/daemon.c",
            "fs/cachefiles/internal.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.19"
            },
            {
              "lessThan": "5.19",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.95",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.35",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.9.*",
              "status": "unaffected",
              "version": "6.9.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.10",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncachefiles: flush all requests after setting CACHEFILES_DEAD\n\nIn ondemand mode, when the daemon is processing an open request, if the\nkernel flags the cache as CACHEFILES_DEAD, the cachefiles_daemon_write()\nwill always return -EIO, so the daemon can\u0027t pass the copen to the kernel.\nThen the kernel process that is waiting for the copen triggers a hung_task.\n\nSince the DEAD state is irreversible, it can only be exited by closing\n/dev/cachefiles. Therefore, after calling cachefiles_io_error() to mark\nthe cache as CACHEFILES_DEAD, if in ondemand mode, flush all requests to\navoid the above hungtask. We may still be able to read some of the cached\ndata before closing the fd of /dev/cachefiles.\n\nNote that this relies on the patch that adds reference counting to the req,\notherwise it may UAF."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-05T09:33:28.695Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/320ba9cbca78be79c912143bbba1d1b35ca55cf0"
        },
        {
          "url": "https://git.kernel.org/stable/c/3bf0b8030296e9ee60d3d4c15849ad9ac0b47081"
        },
        {
          "url": "https://git.kernel.org/stable/c/e73fac95084839c5178d97e81c6a2051251bdc00"
        },
        {
          "url": "https://git.kernel.org/stable/c/85e833cd7243bda7285492b0653c3abb1e2e757b"
        }
      ],
      "title": "cachefiles: flush all requests after setting CACHEFILES_DEAD",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-40935",
    "datePublished": "2024-07-12T12:25:12.483Z",
    "dateReserved": "2024-07-12T12:17:45.584Z",
    "dateUpdated": "2024-11-05T09:33:28.695Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-40935\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-07-12T13:15:16.053\",\"lastModified\":\"2024-11-21T09:31:54.253\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncachefiles: flush all requests after setting CACHEFILES_DEAD\\n\\nIn ondemand mode, when the daemon is processing an open request, if the\\nkernel flags the cache as CACHEFILES_DEAD, the cachefiles_daemon_write()\\nwill always return -EIO, so the daemon can\u0027t pass the copen to the kernel.\\nThen the kernel process that is waiting for the copen triggers a hung_task.\\n\\nSince the DEAD state is irreversible, it can only be exited by closing\\n/dev/cachefiles. Therefore, after calling cachefiles_io_error() to mark\\nthe cache as CACHEFILES_DEAD, if in ondemand mode, flush all requests to\\navoid the above hungtask. We may still be able to read some of the cached\\ndata before closing the fd of /dev/cachefiles.\\n\\nNote that this relies on the patch that adds reference counting to the req,\\notherwise it may UAF.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: cachefiles: vac\u00eda todas las solicitudes despu\u00e9s de configurar CACHEFILES_DEAD En modo bajo demanda, cuando el daemon est\u00e1 procesando una solicitud abierta, si el kernel marca el cach\u00e9 como CACHEFILES_DEAD, cachefiles_daemon_write() siempre devolver\u00e1: EIO, por lo que el daemon no puede pasar el copen al kernel. Luego, el proceso del n\u00facleo que est\u00e1 esperando el copen activa una tarea colgada. Dado que el estado DEAD es irreversible, solo se puede salir cerrando /dev/cachefiles. Por lo tanto, despu\u00e9s de llamar a cachefiles_io_error() para marcar el cach\u00e9 como CACHEFILES_DEAD, si est\u00e1 en modo bajo demanda, vac\u00ede todas las solicitudes para evitar la tarea suspendida anterior. Es posible que a\u00fan podamos leer algunos de los datos almacenados en cach\u00e9 antes de cerrar el fd de /dev/cachefiles. Tenga en cuenta que esto depende del parche que agrega el recuento de referencias al requisito; de lo contrario, puede ser UAF.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/320ba9cbca78be79c912143bbba1d1b35ca55cf0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/3bf0b8030296e9ee60d3d4c15849ad9ac0b47081\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/85e833cd7243bda7285492b0653c3abb1e2e757b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e73fac95084839c5178d97e81c6a2051251bdc00\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/320ba9cbca78be79c912143bbba1d1b35ca55cf0\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/3bf0b8030296e9ee60d3d4c15849ad9ac0b47081\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/85e833cd7243bda7285492b0653c3abb1e2e757b\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/e73fac95084839c5178d97e81c6a2051251bdc00\",\"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.