CVE-2025-40024 (GCVE-0-2025-40024)

Vulnerability from cvelistv5 – Published: 2025-10-24 12:24 – Updated: 2026-08-05 12:07
VLAI
Title
vhost: Take a reference on the task in struct vhost_task.
Summary
In the Linux kernel, the following vulnerability has been resolved: vhost: Take a reference on the task in struct vhost_task. vhost_task_create() creates a task and keeps a reference to its task_struct. That task may exit early via a signal and its task_struct will be released. A pending vhost_task_wake() will then attempt to wake the task and access a task_struct which is no longer there. Acquire a reference on the task_struct while creating the thread and release the reference while the struct vhost_task itself is removed. If the task exits early due to a signal, then the vhost_task_wake() will still access a valid task_struct. The wake is safe and will be skipped in this case.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 6653 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: f9010dbdce911ee1f1af1398a24b1f9f992e0080 , < 82a1463c968b1a6ae598a4f2fcef17b71bb7d3a0 (git)
Affected: f9010dbdce911ee1f1af1398a24b1f9f992e0080 , < d2be773a92874a070215b51b730cb2b1eaa8fae2 (git)
Affected: f9010dbdce911ee1f1af1398a24b1f9f992e0080 , < 7ce635b3d3aba43296b62b5a2d97c008bc51cbd2 (git)
Affected: f9010dbdce911ee1f1af1398a24b1f9f992e0080 , < afe16653e05db07d658b55245c7a2e0603f136c0 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.4
Unaffected: 0 , < 6.4 (semver)
Unaffected: 6.6.109 , ≤ 6.6.* (semver)
Unaffected: 6.12.50 , ≤ 6.12.* (semver)
Unaffected: 6.16.10 , ≤ 6.16.* (semver)
Unaffected: 6.17 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/vhost_task.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "82a1463c968b1a6ae598a4f2fcef17b71bb7d3a0",
              "status": "affected",
              "version": "f9010dbdce911ee1f1af1398a24b1f9f992e0080",
              "versionType": "git"
            },
            {
              "lessThan": "d2be773a92874a070215b51b730cb2b1eaa8fae2",
              "status": "affected",
              "version": "f9010dbdce911ee1f1af1398a24b1f9f992e0080",
              "versionType": "git"
            },
            {
              "lessThan": "7ce635b3d3aba43296b62b5a2d97c008bc51cbd2",
              "status": "affected",
              "version": "f9010dbdce911ee1f1af1398a24b1f9f992e0080",
              "versionType": "git"
            },
            {
              "lessThan": "afe16653e05db07d658b55245c7a2e0603f136c0",
              "status": "affected",
              "version": "f9010dbdce911ee1f1af1398a24b1f9f992e0080",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/vhost_task.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.4"
            },
            {
              "lessThan": "6.4",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.109",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.50",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.109",
                  "versionStartIncluding": "6.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.50",
                  "versionStartIncluding": "6.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.10",
                  "versionStartIncluding": "6.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17",
                  "versionStartIncluding": "6.4",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nvhost: Take a reference on the task in struct vhost_task.\n\nvhost_task_create() creates a task and keeps a reference to its\ntask_struct. That task may exit early via a signal and its task_struct\nwill be released.\nA pending vhost_task_wake() will then attempt to wake the task and\naccess a task_struct which is no longer there.\n\nAcquire a reference on the task_struct while creating the thread and\nrelease the reference while the struct vhost_task itself is removed.\nIf the task exits early due to a signal, then the vhost_task_wake() will\nstill access a valid task_struct. The wake is safe and will be skipped\nin this case."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable code is reached only through local device interfaces \u2014 ioctls on /dev/vhost-net, /dev/vhost-vsock or /dev/vhost-scsi, or /dev/kvm VM setup plus KVM_RUN. No remote or adjacent-network peer can reach `vhost_task_create()`/`vhost_task_wake()`.\nAC:L - The attacker controls both sides of the race: it creates the vhost worker via VHOST_SET_OWNER/VHOST_NEW_WORKER (which unconditionally calls `vhost_worker_queue()` \u2192 `vhost_task_wake()` with no `killed` check) and delivers the SIGKILL from a sibling process, and can retry the sequence indefinitely at no cost. Per UAF guidance this is Low.\nPR:L - Only an ordinary local account with access to the vhost misc devices or /dev/kvm is needed \u2014 there is not a single `capable()`/CAP_* check on the vhost ioctl path, and `vhost_dev_check_owner()` merely compares `dev-\u003emm == current-\u003emm`. On typical KVM/virtualization hosts these nodes are group- or world-accessible and QEMU itself runs unprivileged.\nUI:N - The attacker performs every step itself \u2014 open the device, issue the ioctl, send the signal, trigger the wake. No action by any other user or administrator is required.\nS:U - The freed `task_struct` and the code corrupting it both live in the host kernel, so the impact stays within the kernel\u0027s own security authority. This is a standard local privilege-escalation surface, not a guest-to-host or IOMMU boundary crossing.\nC:H - A use-after-free on `task_struct` lets the attacker reclaim the slab object with sprayed content and have the scheduler operate on it, which is readily leveraged into kernel memory disclosure and, once escalated, full read access to all system memory.\nI:H - `wake_up_process()` on the freed task reaches `activate_task()` \u2192 `p-\u003esched_class-\u003eenqueue_task()`, an indirect call through a function pointer read from freed memory, and enqueues attacker-reallocated data onto a runqueue \u2014 a control-flow-hijack and arbitrary-write primitive.\nA:H - Even without successful exploitation, dereferencing and locking a freed `task_struct` inside the scheduler reliably produces a kernel oops/panic or runqueue corruption, taking down the entire host including all VMs it serves."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:07:06.656Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/82a1463c968b1a6ae598a4f2fcef17b71bb7d3a0"
        },
        {
          "url": "https://git.kernel.org/stable/c/d2be773a92874a070215b51b730cb2b1eaa8fae2"
        },
        {
          "url": "https://git.kernel.org/stable/c/7ce635b3d3aba43296b62b5a2d97c008bc51cbd2"
        },
        {
          "url": "https://git.kernel.org/stable/c/afe16653e05db07d658b55245c7a2e0603f136c0"
        }
      ],
      "title": "vhost: Take a reference on the task in struct vhost_task.",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40024",
    "datePublished": "2025-10-24T12:24:59.199Z",
    "dateReserved": "2025-04-16T07:20:57.152Z",
    "dateUpdated": "2026-08-05T12:07:06.656Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40024",
      "date": "2026-11-08",
      "epss": "0.00154",
      "percentile": "0.04537"
    },
    "microsoft_vex": {
      "current_release_date": "2025-10-26T01:01:14.000Z",
      "cve": "CVE-2025-40024",
      "id": "msrc_CVE-2025-40024",
      "initial_release_date": "2025-10-02T00:00:00.000Z",
      "product_status:fixed": "1",
      "product_status:known_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "vhost: Take a reference on the task in struct vhost_task.",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-40024.json",
      "version": "1"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "kernel/vhost_task.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "82a1463c968b1a6ae598a4f2fcef17b71bb7d3a0",
                    "status": "affected",
                    "version": "f9010dbdce911ee1f1af1398a24b1f9f992e0080",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "d2be773a92874a070215b51b730cb2b1eaa8fae2",
                    "status": "affected",
                    "version": "f9010dbdce911ee1f1af1398a24b1f9f992e0080",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "7ce635b3d3aba43296b62b5a2d97c008bc51cbd2",
                    "status": "affected",
                    "version": "f9010dbdce911ee1f1af1398a24b1f9f992e0080",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "afe16653e05db07d658b55245c7a2e0603f136c0",
                    "status": "affected",
                    "version": "f9010dbdce911ee1f1af1398a24b1f9f992e0080",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "kernel/vhost_task.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.4"
                  },
                  {
                    "lessThan": "6.4",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.6.*",
                    "status": "unaffected",
                    "version": "6.6.109",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.12.*",
                    "status": "unaffected",
                    "version": "6.12.50",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.16.*",
                    "status": "unaffected",
                    "version": "6.16.10",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.17",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nvhost: Take a reference on the task in struct vhost_task.\n\nvhost_task_create() creates a task and keeps a reference to its\ntask_struct. That task may exit early via a signal and its task_struct\nwill be released.\nA pending vhost_task_wake() will then attempt to wake the task and\naccess a task_struct which is no longer there.\n\nAcquire a reference on the task_struct while creating the thread and\nrelease the reference while the struct vhost_task itself is removed.\nIf the task exits early due to a signal, then the vhost_task_wake() will\nstill access a valid task_struct. The wake is safe and will be skipped\nin this case."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nvhost: Tomar una referencia a la tarea en la estructura vhost_task.\n\nvhost_task_create() crea una tarea y mantiene una referencia a su task_struct. Esa tarea puede salir prematuramente a trav\u00e9s de una se\u00f1al y su task_struct ser\u00e1 liberada.\nUna vhost_task_wake() pendiente intentar\u00e1 entonces despertar la tarea y acceder a una task_struct que ya no existe.\n\nAdquirir una referencia a la task_struct mientras se crea el hilo y liberar la referencia mientras la propia estructura vhost_task es eliminada.\nSi la tarea sale prematuramente debido a una se\u00f1al, entonces la vhost_task_wake() seguir\u00e1 accediendo a una task_struct v\u00e1lida. El despertar es seguro y ser\u00e1 omitido en este caso."
          }
        ],
        "id": "CVE-2025-40024",
        "lastModified": "2026-10-19T21:10:00.160",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2025-10-24T13:15:47.647",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/7ce635b3d3aba43296b62b5a2d97c008bc51cbd2"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/82a1463c968b1a6ae598a4f2fcef17b71bb7d3a0"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/afe16653e05db07d658b55245c7a2e0603f136c0"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/d2be773a92874a070215b51b730cb2b1eaa8fae2"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-11-05T15:18:26+00:00",
      "cve": "CVE-2025-40024",
      "id": "CVE-2025-40024",
      "initial_release_date": "2025-10-24T00:00:00+00:00",
      "product_status:known_affected": "1",
      "product_status:known_not_affected": "199",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: vhost: Take a reference on the task in struct vhost_task",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40024.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.