cve-2024-40935
Vulnerability from cvelistv5
Published
2024-07-12 12:25
Modified
2024-12-19 09:08
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: cachefiles: flush all requests after setting CACHEFILES_DEAD In ondemand mode, when the daemon is processing an open request, if the kernel flags the cache as CACHEFILES_DEAD, the cachefiles_daemon_write() will always return -EIO, so the daemon can't pass the copen to the kernel. Then the kernel process that is waiting for the copen triggers a hung_task. Since the DEAD state is irreversible, it can only be exited by closing /dev/cachefiles. Therefore, after calling cachefiles_io_error() to mark the cache as CACHEFILES_DEAD, if in ondemand mode, flush all requests to avoid the above hungtask. We may still be able to read some of the cached data before closing the fd of /dev/cachefiles. Note that this relies on the patch that adds reference counting to the req, otherwise it may UAF.
Impacted products
Vendor Product Version
Linux Linux Version: c8383054506c77b814489c09877b5db83fd4abf2
Version: c8383054506c77b814489c09877b5db83fd4abf2
Version: c8383054506c77b814489c09877b5db83fd4abf2
Version: c8383054506c77b814489c09877b5db83fd4abf2
Create a notification for this product.
   Linux Linux Version: 5.19
Create a notification for this product.
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: "320ba9cbca78be79c912143bbba1d1b35ca55cf0",
                     status: "affected",
                     version: "c8383054506c77b814489c09877b5db83fd4abf2",
                     versionType: "git",
                  },
                  {
                     lessThan: "3bf0b8030296e9ee60d3d4c15849ad9ac0b47081",
                     status: "affected",
                     version: "c8383054506c77b814489c09877b5db83fd4abf2",
                     versionType: "git",
                  },
                  {
                     lessThan: "e73fac95084839c5178d97e81c6a2051251bdc00",
                     status: "affected",
                     version: "c8383054506c77b814489c09877b5db83fd4abf2",
                     versionType: "git",
                  },
                  {
                     lessThan: "85e833cd7243bda7285492b0653c3abb1e2e757b",
                     status: "affected",
                     version: "c8383054506c77b814489c09877b5db83fd4abf2",
                     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't 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-12-19T09:08:30.379Z",
            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-5f407fcff5a0",
         },
      },
   },
   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-12-19T09:08:30.379Z",
      state: "PUBLISHED",
   },
   dataType: "CVE_RECORD",
   dataVersion: "5.1",
   "vulnerability-lookup: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't 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ía todas las solicitudes después de configurar CACHEFILES_DEAD En modo bajo demanda, cuando el daemon está procesando una solicitud abierta, si el kernel marca el caché como CACHEFILES_DEAD, cachefiles_daemon_write() siempre devolverá: EIO, por lo que el daemon no puede pasar el copen al kernel. Luego, el proceso del núcleo que está 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és de llamar a cachefiles_io_error() para marcar el caché como CACHEFILES_DEAD, si está en modo bajo demanda, vacíe todas las solicitudes para evitar la tarea suspendida anterior. Es posible que aún podamos leer algunos de los datos almacenados en caché 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\"}]}}",
      vulnrichment: {
         containers: "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"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\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T04:39:55.674Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-40935\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-10T17:04:46.320967Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-11T12:42:14.177Z\"}}], \"cna\": {\"title\": \"cachefiles: flush all requests after setting CACHEFILES_DEAD\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"c8383054506c\", \"lessThan\": \"320ba9cbca78\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c\", \"lessThan\": \"3bf0b8030296\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c\", \"lessThan\": \"e73fac950848\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c\", \"lessThan\": \"85e833cd7243\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/cachefiles/daemon.c\", \"fs/cachefiles/internal.h\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.19\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.19\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.1.95\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.35\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.9.6\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.9.*\"}, {\"status\": \"unaffected\", \"version\": \"6.10\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/cachefiles/daemon.c\", \"fs/cachefiles/internal.h\"], \"defaultStatus\": \"affected\"}], \"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\"}], \"x_generator\": {\"engine\": \"bippy-9e1c9544281a\"}, \"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't 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\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-11-05T09:33:28.695Z\"}}}",
         cveMetadata: "{\"cveId\": \"CVE-2024-40935\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-11-05T09:33:28.695Z\", \"dateReserved\": \"2024-07-12T12:17:45.584Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-07-12T12:25:12.483Z\", \"assignerShortName\": \"Linux\"}",
         dataType: "CVE_RECORD",
         dataVersion: "5.1",
      },
   },
}


Log in or create an account to share your comment.

Security Advisory comment format.

This schema specifies the format of a comment related to a security advisory.

UUIDv4 of the comment
UUIDv4 of the Vulnerability-Lookup instance
When the comment was created originally
When the comment was last updated
Title of the comment
Description of the comment
The identifier of the vulnerability (CVE ID, GHSA-ID, PYSEC ID, etc.).



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.