7.9

CVE-2024-40953: KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()

Modified
AliasesUBUNTU-CVE-2024-40953DEBIAN-CVE-2024-40953
Published 12-07-2024Last modified 05-08-2026

Vulnerability summary

CVE-2024-40953 is a high (CVSS 7.9) vulnerability in linux. EPSS estimates a 0.20% chance of exploitation in the next 30 days, higher than 9.4% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 7.9, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.9/10
010
High · v3.1 (CVE.org)
EPSS score
0.20%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 46 · Related 43

Timeline

  1. 12-07-2024
    PublishedVulnerability first disclosed.
  2. 05-08-2026
    Last modifiedVulnerability information updated.

Description

In the Linux kernel, the following vulnerability has been resolved: KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() Use {READ,WRITE}_ONCE() to access kvm->last_boosted_vcpu to ensure the loads and stores are atomic. In the extremely unlikely scenario the compiler tears the stores, it's theoretically possible for KVM to attempt to get a vCPU using an out-of-bounds index, e.g. if the write is split into multiple 8-bit stores, and is paired with a 32-bit load on a VM with 257 vCPUs: CPU0 CPU1 last_boosted_vcpu = 0xff; (last_boosted_vcpu = 0x100) last_boosted_vcpu[15:8] = 0x01; i = (last_boosted_vcpu = 0x1ff) last_boosted_vcpu[7:0] = 0x00; vcpu = kvm->vcpu_array[0x1ff]; As detected by KCSAN: BUG: KCSAN: data-race in kvm_vcpu_on_spin [kvm] / kvm_vcpu_on_spin [kvm] write to 0xffffc90025a92344 of 4 bytes by task 4340 on cpu 16: kvm_vcpu_on_spin (arch/x86/kvm/../../../virt/kvm/kvm_main.c:4112) kvm handle_pause (arch/x86/kvm/vmx/vmx.c:5929) kvm_intel vmx_handle_exit (arch/x86/kvm/vmx/vmx.c:? arch/x86/kvm/vmx/vmx.c:6606) kvm_intel vcpu_run (arch/x86/kvm/x86.c:11107 arch/x86/kvm/x86.c:11211) kvm kvm_arch_vcpu_ioctl_run (arch/x86/kvm/x86.c:?) kvm kvm_vcpu_ioctl (arch/x86/kvm/../../../virt/kvm/kvm_main.c:?) kvm __se_sys_ioctl (fs/ioctl.c:52 fs/ioctl.c:904 fs/ioctl.c:890) __x64_sys_ioctl (fs/ioctl.c:890) x64_sys_call (arch/x86/entry/syscall_64.c:33) do_syscall_64 (arch/x86/entry/common.c:?) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) read to 0xffffc90025a92344 of 4 bytes by task 4342 on cpu 4: kvm_vcpu_on_spin (arch/x86/kvm/../../../virt/kvm/kvm_main.c:4069) kvm handle_pause (arch/x86/kvm/vmx/vmx.c:5929) kvm_intel vmx_handle_exit (arch/x86/kvm/vmx/vmx.c:? arch/x86/kvm/vmx/vmx.c:6606) kvm_intel vcpu_run (arch/x86/kvm/x86.c:11107 arch/x86/kvm/x86.c:11211) kvm kvm_arch_vcpu_ioctl_run (arch/x86/kvm/x86.c:?) kvm kvm_vcpu_ioctl (arch/x86/kvm/../../../virt/kvm/kvm_main.c:?) kvm __se_sys_ioctl (fs/ioctl.c:52 fs/ioctl.c:904 fs/ioctl.c:890) __x64_sys_ioctl (fs/ioctl.c:890) x64_sys_call (arch/x86/entry/syscall_64.c:33) do_syscall_64 (arch/x86/entry/common.c:?) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) value changed: 0x00000012 -> 0x00000000

CVSS metrics

4 scores · 4 sources · 1 version

EPSS trend

Probability

0.20%

Chance of exploitation in the next 30 days

Percentile

9%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.20% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Ubuntu128 products
  • linuxAll versions (No fix recorded) | < 5.4.0-208.228 | < 5.15.0-133.144 | < 6.8.0-44.44
  • linux-allwinner-5.19All versions (No fix recorded)
  • linux-awsAll versions (No fix recorded) | < 5.4.0-1140.150 | < 5.15.0-1078.85 | < 6.8.0-1015.16
  • linux-aws-5.0All versions (No fix recorded)
  • linux-aws-5.11All versions (No fix recorded)
Linux2 products
  • linux≥ 217ece6129f2d3b4fdd18d9e79be9e43d8d14a42, < 11a772d5376aa6d3e2e69b5b5c585f79b60c0e17 | ≥ 217ece6129f2d3b4fdd18d9e79be9e43d8d14a42, < 4c141136a28421b78f34969b25a4fa32e06e2180 | ≥ 217ece6129f2d3b4fdd18d9e79be9e43d8d14a42, < 71fbc3af3dacb26c3aa2f30bb3ab05c44d082c84 | ≥ 217ece6129f2d3b4fdd18d9e79be9e43d8d14a42, < 82bd728a06e55f5b5f93d10ce67f4fe7e689853a | ≥ 217ece6129f2d3b4fdd18d9e79be9e43d8d14a42, < 92c77807d938145c7c3350c944ef9f39d7f6017c | ≥ 217ece6129f2d3b4fdd18d9e79be9e43d8d14a42, < a937ef951bba72f48d2402451419d725d70dba20 | ≥ 217ece6129f2d3b4fdd18d9e79be9e43d8d14a42, < 95c8dd79f3a14df96b3820b35b8399bd91b2be60 | ≥ 217ece6129f2d3b4fdd18d9e79be9e43d8d14a42, < 49f683b41f28918df3e51ddc0d928cb2e934ccdb | 2.6.39
  • linux_kernel≥ 2.6.39, < 4.19.323 | ≥ 4.20, < 5.4.285 | ≥ 5.5, < 5.10.228 | ≥ 5.11, < 5.15.169 | ≥ 5.16, < 6.1.96 | ≥ 6.2, < 6.6.36 | ≥ 6.7, < 6.9.7 | 6.10:rc1 | 6.10:rc2 | 6.10:rc3 | 6.10:rc4
Debian1 product
  • linux< 6.1.99-1 | < 6.9.7-1

3 vendors · 131 products

References

46 links
Show all 46 references