Skip to content
Heist/ feed
Back to feed
HighFix available

KVM: Always flush async #PF workqueue when vCPU is being destroyed

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: KVM: Always flush async #PF workqueue when vCPU is being destroyed Always flush the per-vCPU async #PF workqueue when a vCPU is clearing its completion queue, e.g. when a VM and all its vCPUs is being destroyed. KVM must ensure that none of its workqueue callbacks is running when the last reference to the KVM _module_ is put. Gifting a reference to the associated VM prevents the workqueue callback from dereferencing freed vCPU/VM memory, but does not prevent the KVM module from being unloaded before the callback completes. Drop the misguided VM refcount gifting, as calling kvm_put_kvm() from async_pf_execute() if kvm_put_kvm() flushes the async #PF workqueue will result in deadlock. async_pf_execute() can't return until kvm_put_kvm() finishes, and kvm_put_kvm() can't return until async_pf_execute() finishes: WARNING: CPU: 8 PID: 251 at virt/kvm/kvm_main.c:1435 kvm_put_kvm+0x2d/0x320 [kvm] Modules linked in: vhost_net vhost vhost_iotlb tap kvm_intel kvm irqbypass CPU: 8 PID: 251 Comm: kworker/8:1 Tainted: G W 6.6.0-rc1-e7af8d17224a-x86/gmem-vm #119 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Workqueue: events async_pf_execute [kvm] RIP: 0010:kvm_put_kvm+0x2d/0x320 [kvm] Call Trace: async_pf_execute+0x198/0x260 [kvm] process_one_work+0x145/0x2d0 worker_thread+0x27e/0x3a0 kthread+0xba/0xe0 ret_from_fork+0x2d/0x50 ret_from_fork_asm+0x11/0x20 ---[ end trace 0000000000000000 ]--- INFO:

Products
Kernel
Affected versions
Not specified
Fixed versions
4.19.312, 5.10.215, 5.15.154, 5.4.274, 6.1.84, 6.6.24, 6.7.12, 6.8.3
CVEs
CVE-2024-26976
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 03:31 UTC · Revision 1

Source evidence

KVM: Always flush async #PF workqueue when vCPU is being destroyed

core-osv · Original source

Published 1 May 2024, 05:20 UTC

In the Linux kernel, the following vulnerability has been resolved: KVM: Always flush async #PF workqueue when vCPU is being destroyed Always flush the per-vCPU async #PF workqueue when a vCPU is clearing its completion queue, e.g. when a VM and all its vCPUs is being destroyed. KVM must ensure that none of its workqueue callbacks is running when the last reference to the KVM _module_ is put. Gifting a reference to the associated VM prevents the workqueue callback from dereferencing freed vCPU/VM memory, but does not prevent the KVM module from being unloaded before the callback completes. Drop the misguided VM refcount gifting, as calling kvm_put_kvm() from async_pf_execute() if kvm_put_kvm() flushes the async #PF workqueue will result in deadlock. async_pf_execute() can't return until kvm_put_kvm() finishes, and kvm_put_kvm() can't return until async_pf_execute() finishes: WARNING: CPU: 8 PID: 251 at virt/kvm/kvm_main.c:1435 kvm_put_kvm+0x2d/0x320 [kvm] Modules linked in: vhost_net vhost vhost_iotlb tap kvm_intel kvm irqbypass CPU: 8 PID: 251 Comm: kworker/8:1 Tainted: G W 6.6.0-rc1-e7af8d17224a-x86/gmem-vm #119 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Workqueue: events async_pf_execute [kvm] RIP: 0010:kvm_put_kvm+0x2d/0x320 [kvm] Call Trace: async_pf_execute+0x198/0x260 [kvm] process_one_work+0x145/0x2d0 worker_thread+0x27e/0x3a0 kthread+0xba/0xe0 ret_from_fork+0x2d/0x50 ret_from_fork_asm+0x11/0x20 ---[ end trace 0000000000000000 ]--- INFO:

osv:CVE-2024-26976

Kernel

Fixed versions: 4.19.312, 5.4.274, 5.10.215, 5.15.154, 6.1.84, 6.6.24, 6.7.12, 6.8.3

Complete source record
{
  "id": "9c523231472a96217f6b9e2065657e65d18837687c9b78ebb276220a1069630d",
  "url": "https://osv.dev/vulnerability/CVE-2024-26976",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "KVM: Always flush async #PF workqueue when vCPU is being destroyed",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: KVM: Always flush async #PF workqueue when vCPU is being destroyed Always flush the per-vCPU async #PF workqueue when a vCPU is clearing its completion queue, e.g. when a VM and all its vCPUs is being destroyed. KVM must ensure that none of its workqueue callbacks is running when the last reference to the KVM _module_ is put. Gifting a reference to the associated VM prevents the workqueue callback from dereferencing freed vCPU/VM memory, but does not prevent the KVM module from being unloaded before the callback completes. Drop the misguided VM refcount gifting, as calling kvm_put_kvm() from async_pf_execute() if kvm_put_kvm() flushes the async #PF workqueue will result in deadlock. async_pf_execute() can't return until kvm_put_kvm() finishes, and kvm_put_kvm() can't return until async_pf_execute() finishes: WARNING: CPU: 8 PID: 251 at virt/kvm/kvm_main.c:1435 kvm_put_kvm+0x2d/0x320 [kvm] Modules linked in: vhost_net vhost vhost_iotlb tap kvm_intel kvm irqbypass CPU: 8 PID: 251 Comm: kworker/8:1 Tainted: G W 6.6.0-rc1-e7af8d17224a-x86/gmem-vm #119 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Workqueue: events async_pf_execute [kvm] RIP: 0010:kvm_put_kvm+0x2d/0x320 [kvm] Call Trace: async_pf_execute+0x198/0x260 [kvm] process_one_work+0x145/0x2d0 worker_thread+0x27e/0x3a0 kthread+0xba/0xe0 ret_from_fork+0x2d/0x50 ret_from_fork_asm+0x11/0x20 ---[ end trace 0000000000000000 ]--- INFO:",
    "evidence": "osv:CVE-2024-26976",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.19.312",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.274",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.215",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.154",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.84",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.24",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.7.12",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.8.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-26976",
      "aliases": [
        "CVE-2024-26976"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "af585b921e5d1e919947c4b1164b59507fe7cd7b"
                },
                {
                  "fixed": "ab2c2f5d9576112ad22cfd3798071cb74693b1f5"
                },
                {
                  "fixed": "82e25cc1c2e93c3023da98be282322fc08b61ffb"
                },
                {
                  "fixed": "f8730d6335e5f43d09151fca1f0f41922209a264"
                },
                {
                  "fixed": "83d3c5e309611ef593e2fcb78444fc8ceedf9bac"
                },
                {
                  "fixed": "b54478d20375874aeee257744dedfd3e413432ff"
                },
                {
                  "fixed": "a75afe480d4349c524d9c659b1a5a544dbc39a98"
                },
                {
                  "fixed": "4f3a3bce428fb439c66a578adc447afce7b4a750"
                },
                {
                  "fixed": "caa9af2e27c275e089d702cfbaaece3b42bca31b"
                },
                {
                  "fixed": "3d75b8aa5c29058a512db29da7cbee8052724157"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26976.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.38"
                },
                {
                  "fixed": "4.19.312"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.274"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.215"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.154"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.84"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.24"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.7.12"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.8.0"
                },
                {
                  "fixed": "6.8.3"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26976.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.609083687Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/3d75b8aa5c29058a512db29da7cbee8052724157",
        "https://git.kernel.org/stable/c/4f3a3bce428fb439c66a578adc447afce7b4a750",
        "https://git.kernel.org/stable/c/82e25cc1c2e93c3023da98be282322fc08b61ffb",
        "https://git.kernel.org/stable/c/83d3c5e309611ef593e2fcb78444fc8ceedf9bac",
        "https://git.kernel.org/stable/c/a75afe480d4349c524d9c659b1a5a544dbc39a98",
        "https://git.kernel.org/stable/c/ab2c2f5d9576112ad22cfd3798071cb74693b1f5",
        "https://git.kernel.org/stable/c/b54478d20375874aeee257744dedfd3e413432ff",
        "https://git.kernel.org/stable/c/caa9af2e27c275e089d702cfbaaece3b42bca31b",
        "https://git.kernel.org/stable/c/f8730d6335e5f43d09151fca1f0f41922209a264",
        "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html",
        "https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26976.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-26976",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26976.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-26976",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 517771,
  "published_at": "2024-05-01T05:20:24.025+00:00"
}