CVE-2025-40024 (GCVE-0-2025-40024)
Vulnerability from cvelistv5
Published
2025-10-24 12:24
Modified
2026-08-05 12:07
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.
Impacted products
Vendor Product Version
Linux Linux Version: f9010dbdce911ee1f1af1398a24b1f9f992e0080
Version: f9010dbdce911ee1f1af1398a24b1f9f992e0080
Version: f9010dbdce911ee1f1af1398a24b1f9f992e0080
Version: f9010dbdce911ee1f1af1398a24b1f9f992e0080
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"
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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.


Loading…

Loading…