{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-40953", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-07-12T12:17:45.592Z", "datePublished": "2024-07-12T12:31:56.832Z", "dateUpdated": "2026-08-05T11:34:12.855Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:34:12.855Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()\n\nUse {READ,WRITE}_ONCE() to access kvm->last_boosted_vcpu to ensure the\nloads and stores are atomic. In the extremely unlikely scenario the\ncompiler tears the stores, it's theoretically possible for KVM to attempt\nto get a vCPU using an out-of-bounds index, e.g. if the write is split\ninto multiple 8-bit stores, and is paired with a 32-bit load on a VM with\n257 vCPUs:\n\n CPU0 CPU1\n last_boosted_vcpu = 0xff;\n\n (last_boosted_vcpu = 0x100)\n last_boosted_vcpu[15:8] = 0x01;\n i = (last_boosted_vcpu = 0x1ff)\n last_boosted_vcpu[7:0] = 0x00;\n\n vcpu = kvm->vcpu_array[0x1ff];\n\nAs detected by KCSAN:\n\n BUG: KCSAN: data-race in kvm_vcpu_on_spin [kvm] / kvm_vcpu_on_spin [kvm]\n\n write to 0xffffc90025a92344 of 4 bytes by task 4340 on cpu 16:\n kvm_vcpu_on_spin (arch/x86/kvm/../../../virt/kvm/kvm_main.c:4112) kvm\n handle_pause (arch/x86/kvm/vmx/vmx.c:5929) kvm_intel\n vmx_handle_exit (arch/x86/kvm/vmx/vmx.c:?\n\t\t arch/x86/kvm/vmx/vmx.c:6606) kvm_intel\n vcpu_run (arch/x86/kvm/x86.c:11107 arch/x86/kvm/x86.c:11211) kvm\n kvm_arch_vcpu_ioctl_run (arch/x86/kvm/x86.c:?) kvm\n kvm_vcpu_ioctl (arch/x86/kvm/../../../virt/kvm/kvm_main.c:?) kvm\n __se_sys_ioctl (fs/ioctl.c:52 fs/ioctl.c:904 fs/ioctl.c:890)\n __x64_sys_ioctl (fs/ioctl.c:890)\n x64_sys_call (arch/x86/entry/syscall_64.c:33)\n do_syscall_64 (arch/x86/entry/common.c:?)\n entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)\n\n read to 0xffffc90025a92344 of 4 bytes by task 4342 on cpu 4:\n kvm_vcpu_on_spin (arch/x86/kvm/../../../virt/kvm/kvm_main.c:4069) kvm\n handle_pause (arch/x86/kvm/vmx/vmx.c:5929) kvm_intel\n vmx_handle_exit (arch/x86/kvm/vmx/vmx.c:?\n\t\t\tarch/x86/kvm/vmx/vmx.c:6606) kvm_intel\n vcpu_run (arch/x86/kvm/x86.c:11107 arch/x86/kvm/x86.c:11211) kvm\n kvm_arch_vcpu_ioctl_run (arch/x86/kvm/x86.c:?) kvm\n kvm_vcpu_ioctl (arch/x86/kvm/../../../virt/kvm/kvm_main.c:?) kvm\n __se_sys_ioctl (fs/ioctl.c:52 fs/ioctl.c:904 fs/ioctl.c:890)\n __x64_sys_ioctl (fs/ioctl.c:890)\n x64_sys_call (arch/x86/entry/syscall_64.c:33)\n do_syscall_64 (arch/x86/entry/common.c:?)\n entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)\n\n value changed: 0x00000012 -> 0x00000000" } ], "metrics": [ { "cvssV3_1": { "version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:H", "baseScore": 7.9, "baseSeverity": "HIGH" }, "scenarios": [ { "lang": "en", "value": "AV:L - The vulnerable code is entered only from guest execution of PAUSE/WFE/DIAG-0x44 handled by the host KVM module, or equivalently via the `KVM_RUN` ioctl on `/dev/kvm` as shown in the KCSAN stack trace. There is no network-facing path to `kvm_vcpu_on_spin()`, so the attacker must be running code locally on the host or inside a VM hosted on it.\nAC:L - The attacker controls both sides of the race outright — a guest simply runs PAUSE spin loops on several vCPUs at once, driving many threads into the unsynchronized read/write of `kvm->last_boosted_vcpu` with no external precondition. No specific victim state or memory layout the attacker cannot influence is required to hit the racing accesses.\nPR:L - The attacker needs the ability to run code inside a VM on the host (or open `/dev/kvm` locally), which is an unprivileged-user-level capability — no root or CAP_SYS_ADMIN is required, and PAUSE is executable from guest ring 3. This matches the standard treatment of guest-triggerable KVM host bugs.\nUI:N - Triggering requires only that the attacker's own guest vCPU threads spin concurrently; no host administrator or other user has to perform any action. The race is hit entirely by the attacker's own execution.\nS:C - The bug is triggered by unprivileged code inside a guest but the corrupted index and any resulting wild pointer access occur in the host kernel, crossing the VM-to-hypervisor security boundary. A guest compromising host kernel availability/integrity is a scope change.\nC:L - A torn value yields an out-of-bounds vCPU index, causing the host to read a pointer-sized slot past the vCPU array and then dereference it (`vcpu->ready`, `vcpu->preempted`, `target->pid`), touching host kernel memory outside the intended object. The read value is never returned to the guest and the offset is not attacker-chosen, so this is a limited disclosure rather than an arbitrary read primitive.\nI:L - `kvm_vcpu_eligible_for_directed_yield()` writes `vcpu->spin_loop.dy_eligible` through the same unvalidated pointer, giving a fixed-offset host-kernel write via an out-of-bounds vCPU reference, and the bogus target also perturbs host scheduling through `yield_to()`. The written value and target address are not attacker-controlled, limiting this to bounded corruption rather than a control-flow hijack primitive.\nA:H - Per the upstream changelog, the torn access lets KVM fetch a vCPU with an out-of-bounds index; the resulting NULL or garbage pointer is dereferenced without any validation, oopsing or panicking the host kernel. A guest crashing the hypervisor takes down the host and every other VM on it." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "virt/kvm/kvm_main.c" ], "versions": [ { "version": "217ece6129f2d3b4fdd18d9e79be9e43d8d14a42", "lessThan": "11a772d5376aa6d3e2e69b5b5c585f79b60c0e17", "status": "affected", "versionType": "git" }, { "version": "217ece6129f2d3b4fdd18d9e79be9e43d8d14a42", "lessThan": "4c141136a28421b78f34969b25a4fa32e06e2180", "status": "affected", "versionType": "git" }, { "version": "217ece6129f2d3b4fdd18d9e79be9e43d8d14a42", "lessThan": "71fbc3af3dacb26c3aa2f30bb3ab05c44d082c84", "status": "affected", "versionType": "git" }, { "version": "217ece6129f2d3b4fdd18d9e79be9e43d8d14a42", "lessThan": "82bd728a06e55f5b5f93d10ce67f4fe7e689853a", "status": "affected", "versionType": "git" }, { "version": "217ece6129f2d3b4fdd18d9e79be9e43d8d14a42", "lessThan": "92c77807d938145c7c3350c944ef9f39d7f6017c", "status": "affected", "versionType": "git" }, { "version": "217ece6129f2d3b4fdd18d9e79be9e43d8d14a42", "lessThan": "a937ef951bba72f48d2402451419d725d70dba20", "status": "affected", "versionType": "git" }, { "version": "217ece6129f2d3b4fdd18d9e79be9e43d8d14a42", "lessThan": "95c8dd79f3a14df96b3820b35b8399bd91b2be60", "status": "affected", "versionType": "git" }, { "version": "217ece6129f2d3b4fdd18d9e79be9e43d8d14a42", "lessThan": "49f683b41f28918df3e51ddc0d928cb2e934ccdb", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "virt/kvm/kvm_main.c" ], "versions": [ { "version": "2.6.39", "status": "affected" }, { "version": "0", "lessThan": "2.6.39", "status": "unaffected", "versionType": "semver" }, { "version": "4.19.323", "lessThanOrEqual": "4.19.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.4.285", "lessThanOrEqual": "5.4.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.228", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.169", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.96", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.36", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.9.7", "lessThanOrEqual": "6.9.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.10", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.39", "versionEndExcluding": "4.19.323" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.39", "versionEndExcluding": "5.4.285" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.39", "versionEndExcluding": "5.10.228" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.39", "versionEndExcluding": "5.15.169" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.39", "versionEndExcluding": "6.1.96" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.39", "versionEndExcluding": "6.6.36" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.39", "versionEndExcluding": "6.9.7" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.39", "versionEndExcluding": "6.10" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/11a772d5376aa6d3e2e69b5b5c585f79b60c0e17" }, { "url": "https://git.kernel.org/stable/c/4c141136a28421b78f34969b25a4fa32e06e2180" }, { "url": "https://git.kernel.org/stable/c/71fbc3af3dacb26c3aa2f30bb3ab05c44d082c84" }, { "url": "https://git.kernel.org/stable/c/82bd728a06e55f5b5f93d10ce67f4fe7e689853a" }, { "url": "https://git.kernel.org/stable/c/92c77807d938145c7c3350c944ef9f39d7f6017c" }, { "url": "https://git.kernel.org/stable/c/a937ef951bba72f48d2402451419d725d70dba20" }, { "url": "https://git.kernel.org/stable/c/95c8dd79f3a14df96b3820b35b8399bd91b2be60" }, { "url": "https://git.kernel.org/stable/c/49f683b41f28918df3e51ddc0d928cb2e934ccdb" } ], "title": "KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "title": "CVE Program Container", "references": [ { "url": "https://git.kernel.org/stable/c/92c77807d938145c7c3350c944ef9f39d7f6017c", "tags": [ "x_transferred" ] }, { "url": "https://git.kernel.org/stable/c/a937ef951bba72f48d2402451419d725d70dba20", "tags": [ "x_transferred" ] }, { "url": "https://git.kernel.org/stable/c/95c8dd79f3a14df96b3820b35b8399bd91b2be60", "tags": [ "x_transferred" ] }, { "url": "https://git.kernel.org/stable/c/49f683b41f28918df3e51ddc0d928cb2e934ccdb", "tags": [ "x_transferred" ] }, { "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html" }, { "url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T21:58:17.097Z" } }, { "metrics": [ { "other": { "type": "ssvc", "content": { "id": "CVE-2024-40953", "role": "CISA Coordinator", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "version": "2.0.3", "timestamp": "2024-09-10T17:03:52.034893Z" } } } ], "title": "CISA ADP Vulnrichment", "providerMetadata": { "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2024-09-11T17:34:24.499Z" } } ] } }