cve-2024-41050
Vulnerability from cvelistv5
Published
2024-07-29 14:32
Modified
2024-12-19 09:10
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: cachefiles: cyclic allocation of msg_id to avoid reuse Reusing the msg_id after a maliciously completed reopen request may cause a read request to remain unprocessed and result in a hung, as shown below: t1 | t2 | t3 ------------------------------------------------- cachefiles_ondemand_select_req cachefiles_ondemand_object_is_close(A) cachefiles_ondemand_set_object_reopening(A) queue_work(fscache_object_wq, &info->work) ondemand_object_worker cachefiles_ondemand_init_object(A) cachefiles_ondemand_send_req(OPEN) // get msg_id 6 wait_for_completion(&req_A->done) cachefiles_ondemand_daemon_read // read msg_id 6 req_A cachefiles_ondemand_get_fd copy_to_user // Malicious completion msg_id 6 copen 6,-1 cachefiles_ondemand_copen complete(&req_A->done) // will not set the object to close // because ondemand_id && fd is valid. // ondemand_object_worker() is done // but the object is still reopening. // new open req_B cachefiles_ondemand_init_object(B) cachefiles_ondemand_send_req(OPEN) // reuse msg_id 6 process_open_req copen 6,A.size // The expected failed copen was executed successfully Expect copen to fail, and when it does, it closes fd, which sets the object to close, and then close triggers reopen again. However, due to msg_id reuse resulting in a successful copen, the anonymous fd is not closed until the daemon exits. Therefore read requests waiting for reopen to complete may trigger hung task. To avoid this issue, allocate the msg_id cyclically to avoid reusing the msg_id for a very short duration of time.
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:46:51.167Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/35710c6c4a1c64478ec1b5e0e81d386c0844dec6"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/de045a82e1a4e04be62718d3c2981a55150765a0"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/9d3bf4e9aa23f0d9e99ebe7a94f232ddba54ee17"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/19f4f399091478c95947f6bd7ad61622300c30d9"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-41050",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T16:22:44.765096Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:32:57.925Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/cachefiles/internal.h",
            "fs/cachefiles/ondemand.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "35710c6c4a1c64478ec1b5e0e81d386c0844dec6",
              "status": "affected",
              "version": "c8383054506c77b814489c09877b5db83fd4abf2",
              "versionType": "git"
            },
            {
              "lessThan": "de045a82e1a4e04be62718d3c2981a55150765a0",
              "status": "affected",
              "version": "c8383054506c77b814489c09877b5db83fd4abf2",
              "versionType": "git"
            },
            {
              "lessThan": "9d3bf4e9aa23f0d9e99ebe7a94f232ddba54ee17",
              "status": "affected",
              "version": "c8383054506c77b814489c09877b5db83fd4abf2",
              "versionType": "git"
            },
            {
              "lessThan": "19f4f399091478c95947f6bd7ad61622300c30d9",
              "status": "affected",
              "version": "c8383054506c77b814489c09877b5db83fd4abf2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/cachefiles/internal.h",
            "fs/cachefiles/ondemand.c"
          ],
          "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.100",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.41",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.9.*",
              "status": "unaffected",
              "version": "6.9.10",
              "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: cyclic allocation of msg_id to avoid reuse\n\nReusing the msg_id after a maliciously completed reopen request may cause\na read request to remain unprocessed and result in a hung, as shown below:\n\n       t1       |      t2       |      t3\n-------------------------------------------------\ncachefiles_ondemand_select_req\n cachefiles_ondemand_object_is_close(A)\n cachefiles_ondemand_set_object_reopening(A)\n queue_work(fscache_object_wq, \u0026info-\u003ework)\n                ondemand_object_worker\n                 cachefiles_ondemand_init_object(A)\n                  cachefiles_ondemand_send_req(OPEN)\n                    // get msg_id 6\n                    wait_for_completion(\u0026req_A-\u003edone)\ncachefiles_ondemand_daemon_read\n // read msg_id 6 req_A\n cachefiles_ondemand_get_fd\n copy_to_user\n                                // Malicious completion msg_id 6\n                                copen 6,-1\n                                cachefiles_ondemand_copen\n                                 complete(\u0026req_A-\u003edone)\n                                 // will not set the object to close\n                                 // because ondemand_id \u0026\u0026 fd is valid.\n\n                // ondemand_object_worker() is done\n                // but the object is still reopening.\n\n                                // new open req_B\n                                cachefiles_ondemand_init_object(B)\n                                 cachefiles_ondemand_send_req(OPEN)\n                                 // reuse msg_id 6\nprocess_open_req\n copen 6,A.size\n // The expected failed copen was executed successfully\n\nExpect copen to fail, and when it does, it closes fd, which sets the\nobject to close, and then close triggers reopen again. However, due to\nmsg_id reuse resulting in a successful copen, the anonymous fd is not\nclosed until the daemon exits. Therefore read requests waiting for reopen\nto complete may trigger hung task.\n\nTo avoid this issue, allocate the msg_id cyclically to avoid reusing the\nmsg_id for a very short duration of time."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T09:10:55.482Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/35710c6c4a1c64478ec1b5e0e81d386c0844dec6"
        },
        {
          "url": "https://git.kernel.org/stable/c/de045a82e1a4e04be62718d3c2981a55150765a0"
        },
        {
          "url": "https://git.kernel.org/stable/c/9d3bf4e9aa23f0d9e99ebe7a94f232ddba54ee17"
        },
        {
          "url": "https://git.kernel.org/stable/c/19f4f399091478c95947f6bd7ad61622300c30d9"
        }
      ],
      "title": "cachefiles: cyclic allocation of msg_id to avoid reuse",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-41050",
    "datePublished": "2024-07-29T14:32:06.761Z",
    "dateReserved": "2024-07-12T12:17:45.626Z",
    "dateUpdated": "2024-12-19T09:10:55.482Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-41050\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-07-29T15:15:13.260\",\"lastModified\":\"2024-11-21T09:32:08.500\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncachefiles: cyclic allocation of msg_id to avoid reuse\\n\\nReusing the msg_id after a maliciously completed reopen request may cause\\na read request to remain unprocessed and result in a hung, as shown below:\\n\\n       t1       |      t2       |      t3\\n-------------------------------------------------\\ncachefiles_ondemand_select_req\\n cachefiles_ondemand_object_is_close(A)\\n cachefiles_ondemand_set_object_reopening(A)\\n queue_work(fscache_object_wq, \u0026info-\u003ework)\\n                ondemand_object_worker\\n                 cachefiles_ondemand_init_object(A)\\n                  cachefiles_ondemand_send_req(OPEN)\\n                    // get msg_id 6\\n                    wait_for_completion(\u0026req_A-\u003edone)\\ncachefiles_ondemand_daemon_read\\n // read msg_id 6 req_A\\n cachefiles_ondemand_get_fd\\n copy_to_user\\n                                // Malicious completion msg_id 6\\n                                copen 6,-1\\n                                cachefiles_ondemand_copen\\n                                 complete(\u0026req_A-\u003edone)\\n                                 // will not set the object to close\\n                                 // because ondemand_id \u0026\u0026 fd is valid.\\n\\n                // ondemand_object_worker() is done\\n                // but the object is still reopening.\\n\\n                                // new open req_B\\n                                cachefiles_ondemand_init_object(B)\\n                                 cachefiles_ondemand_send_req(OPEN)\\n                                 // reuse msg_id 6\\nprocess_open_req\\n copen 6,A.size\\n // The expected failed copen was executed successfully\\n\\nExpect copen to fail, and when it does, it closes fd, which sets the\\nobject to close, and then close triggers reopen again. However, due to\\nmsg_id reuse resulting in a successful copen, the anonymous fd is not\\nclosed until the daemon exits. Therefore read requests waiting for reopen\\nto complete may trigger hung task.\\n\\nTo avoid this issue, allocate the msg_id cyclically to avoid reusing the\\nmsg_id for a very short duration of time.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: archivos de cach\u00e9: asignaci\u00f3n c\u00edclica de msg_id para evitar la reutilizaci\u00f3n La reutilizaci\u00f3n de msg_id despu\u00e9s de una solicitud de reapertura completada maliciosamente puede causar que una solicitud de lectura permanezca sin procesar y resulte en un bloqueo, como se muestra a continuaci\u00f3n: t1 | t2 | t3 ------------------------------------------------- cachefiles_ondemand_select_req cachefiles_ondemand_object_is_close(A) cachefiles_ondemand_set_object_reopening(A) queue_work(fscache_object_wq, \u0026amp;info-\u0026gt;work) ondemand_object_worker cachefiles_ondemand_init_object(A) cachefiles_ondemand_send_req(OPEN) // obtener msg_id 6 _completion(\u0026amp;req_A-\u0026gt;done) cachefiles_ondemand_daemon_read // leer msg_id 6 req_A cachefiles_ondemand_get_fd copy_to_user // Finalizaci\u00f3n maliciosa msg_id 6 copen 6,-1 cachefiles_ondemand_copen complete(\u0026amp;req_A-\u0026gt;done) // no configurar\u00e1 el objeto para que se cierre // porque ondemand_id \u0026amp;\u0026amp; fd es v\u00e1lido. // ondemand_object_worker() est\u00e1 listo // pero el objeto a\u00fan se est\u00e1 reabriendo. // new open req_B cachefiles_ondemand_init_object(B) cachefiles_ondemand_send_req(OPEN) // reutilizar msg_id 6 process_open_req copen 6,A.size // El copen fallido esperado se ejecut\u00f3 con \u00e9xito Se espera que copen falle y, cuando lo hace, cierra fd, lo que establece el objeto se cierra y luego el cierre activa nuevamente. Sin embargo, debido a que la reutilizaci\u00f3n de msg_id da como resultado un copen exitoso, el fd an\u00f3nimo no se cierra hasta que el demonio sale. Por lo tanto, las solicitudes de lectura que esperan que se complete la reapertura pueden desencadenar una tarea colgada. Para evitar este problema, asigne msg_id c\u00edclicamente para evitar reutilizar msg_id durante un per\u00edodo de tiempo muy corto.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/19f4f399091478c95947f6bd7ad61622300c30d9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/35710c6c4a1c64478ec1b5e0e81d386c0844dec6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9d3bf4e9aa23f0d9e99ebe7a94f232ddba54ee17\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/de045a82e1a4e04be62718d3c2981a55150765a0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/19f4f399091478c95947f6bd7ad61622300c30d9\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/35710c6c4a1c64478ec1b5e0e81d386c0844dec6\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/9d3bf4e9aa23f0d9e99ebe7a94f232ddba54ee17\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/de045a82e1a4e04be62718d3c2981a55150765a0\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/35710c6c4a1c64478ec1b5e0e81d386c0844dec6\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/de045a82e1a4e04be62718d3c2981a55150765a0\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/9d3bf4e9aa23f0d9e99ebe7a94f232ddba54ee17\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/19f4f399091478c95947f6bd7ad61622300c30d9\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T04:46:51.167Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-41050\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-10T16:22:44.765096Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-11T12:42:13.791Z\"}}], \"cna\": {\"title\": \"cachefiles: cyclic allocation of msg_id to avoid reuse\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"c8383054506c\", \"lessThan\": \"35710c6c4a1c\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c\", \"lessThan\": \"de045a82e1a4\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c\", \"lessThan\": \"9d3bf4e9aa23\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c\", \"lessThan\": \"19f4f3990914\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/cachefiles/internal.h\", \"fs/cachefiles/ondemand.c\"], \"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.100\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.41\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.9.10\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.9.*\"}, {\"status\": \"unaffected\", \"version\": \"6.10\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/cachefiles/internal.h\", \"fs/cachefiles/ondemand.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/35710c6c4a1c64478ec1b5e0e81d386c0844dec6\"}, {\"url\": \"https://git.kernel.org/stable/c/de045a82e1a4e04be62718d3c2981a55150765a0\"}, {\"url\": \"https://git.kernel.org/stable/c/9d3bf4e9aa23f0d9e99ebe7a94f232ddba54ee17\"}, {\"url\": \"https://git.kernel.org/stable/c/19f4f399091478c95947f6bd7ad61622300c30d9\"}], \"x_generator\": {\"engine\": \"bippy-9e1c9544281a\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncachefiles: cyclic allocation of msg_id to avoid reuse\\n\\nReusing the msg_id after a maliciously completed reopen request may cause\\na read request to remain unprocessed and result in a hung, as shown below:\\n\\n       t1       |      t2       |      t3\\n-------------------------------------------------\\ncachefiles_ondemand_select_req\\n cachefiles_ondemand_object_is_close(A)\\n cachefiles_ondemand_set_object_reopening(A)\\n queue_work(fscache_object_wq, \u0026info-\u003ework)\\n                ondemand_object_worker\\n                 cachefiles_ondemand_init_object(A)\\n                  cachefiles_ondemand_send_req(OPEN)\\n                    // get msg_id 6\\n                    wait_for_completion(\u0026req_A-\u003edone)\\ncachefiles_ondemand_daemon_read\\n // read msg_id 6 req_A\\n cachefiles_ondemand_get_fd\\n copy_to_user\\n                                // Malicious completion msg_id 6\\n                                copen 6,-1\\n                                cachefiles_ondemand_copen\\n                                 complete(\u0026req_A-\u003edone)\\n                                 // will not set the object to close\\n                                 // because ondemand_id \u0026\u0026 fd is valid.\\n\\n                // ondemand_object_worker() is done\\n                // but the object is still reopening.\\n\\n                                // new open req_B\\n                                cachefiles_ondemand_init_object(B)\\n                                 cachefiles_ondemand_send_req(OPEN)\\n                                 // reuse msg_id 6\\nprocess_open_req\\n copen 6,A.size\\n // The expected failed copen was executed successfully\\n\\nExpect copen to fail, and when it does, it closes fd, which sets the\\nobject to close, and then close triggers reopen again. However, due to\\nmsg_id reuse resulting in a successful copen, the anonymous fd is not\\nclosed until the daemon exits. Therefore read requests waiting for reopen\\nto complete may trigger hung task.\\n\\nTo avoid this issue, allocate the msg_id cyclically to avoid reusing the\\nmsg_id for a very short duration of time.\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-11-05T09:35:41.468Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-41050\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-11-05T09:35:41.468Z\", \"dateReserved\": \"2024-07-12T12:17:45.626Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-07-29T14:32:06.761Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


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.