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
Impacted products
Vendor Product Version
Linux Linux Affected: f9010dbdce911ee1f1af1398a24b1f9f992e0080 , < 82a1463c968b1a6ae598a4f2fcef17b71bb7d3a0 (git)
Affected: f9010dbdce911ee1f1af1398a24b1f9f992e0080 , < d2be773a92874a070215b51b730cb2b1eaa8fae2 (git)
Affected: f9010dbdce911ee1f1af1398a24b1f9f992e0080 , < 7ce635b3d3aba43296b62b5a2d97c008bc51cbd2 (git)
Affected: f9010dbdce911ee1f1af1398a24b1f9f992e0080 , < afe16653e05db07d658b55245c7a2e0603f136c0 (git)
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)
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-08-08",
      "epss": "0.00144",
      "percentile": "0.04106"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-40024\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-24T13:15:47.647\",\"lastModified\":\"2026-07-30T06:24:06.390\",\"vulnStatus\":\"Deferred\",\"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.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"kernel/vhost_task.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"f9010dbdce911ee1f1af1398a24b1f9f992e0080\",\"lessThan\":\"82a1463c968b1a6ae598a4f2fcef17b71bb7d3a0\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"f9010dbdce911ee1f1af1398a24b1f9f992e0080\",\"lessThan\":\"d2be773a92874a070215b51b730cb2b1eaa8fae2\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"f9010dbdce911ee1f1af1398a24b1f9f992e0080\",\"lessThan\":\"7ce635b3d3aba43296b62b5a2d97c008bc51cbd2\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"f9010dbdce911ee1f1af1398a24b1f9f992e0080\",\"lessThan\":\"afe16653e05db07d658b55245c7a2e0603f136c0\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"kernel/vhost_task.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.4\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.4\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.6.109\",\"lessThanOrEqual\":\"6.6.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.50\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.16.10\",\"lessThanOrEqual\":\"6.16.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"references\":[{\"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\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-07-30T08:52:40+00:00",
      "cve": "CVE-2025-40024",
      "id": "CVE-2025-40024",
      "initial_release_date": "2025-10-24T00:00:00+00:00",
      "product_status:known_affected": "76",
      "product_status:known_not_affected": "198",
      "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"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-07-19T17:47:13Z",
      "cve": "CVE-2025-40024",
      "id": "CVE-2025-40024",
      "initial_release_date": "2025-10-24T23:24:18Z",
      "product_status:first_fixed": "2",
      "product_status:known_affected": "449",
      "product_status:known_not_affected": "266",
      "product_status:recommended": "384",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40024",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-40024.json",
      "version": "36"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

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.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…