Vulnerability · Published Jul 12, 2024 · Assigned by Linux
CVE-2024-40953KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()
High 7.9
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.99-1 | DEBIAN-CVE-2024-40953 |
| Debian:13 | linux | 6.9.7-1 | DEBIAN-CVE-2024-40953 |
| Debian:14 | linux | 6.9.7-1 | DEBIAN-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux | 5.15.0-133.144 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux | 5.15.0-133.144 | USN-7288-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-44.44 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1078.85 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1078.85 | USN-7308-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1015.16 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1015.16~22.04.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1081.90 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1081.90 | USN-7289-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1014.16 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1081.90.1 | USN-7289-1 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1081.90.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1077.86 | USN-7291-1 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1077.86 | UBUNTU-CVE-2024-40953 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1014.16 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1075.81 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1075.81 | USN-7291-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1010.13 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1060.68 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1060.68 | USN-7289-1 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-45.45~22.04.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1070.73 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1070.73 | USN-7289-3 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1012.12 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1073.79 | USN-7289-4 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1073.79 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1076.81 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1076.81 | USN-7388-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-133.143 | USN-7288-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-133.143 | UBUNTU-CVE-2024-40953 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-44.44.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1072.73 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1072.73 | USN-7289-1 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1013.14 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1013.14.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1033.33 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1033.33 | USN-7389-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1021.21 | USN-7389-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1021.21 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1012.12 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1075.81 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1075.81 | USN-7289-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1012.12 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1072.75 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1072.75 | USN-7305-1 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1011.12 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-44.44.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-40953 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1044.48 | USN-7390-1 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1044.48 | UBUNTU-CVE-2024-40953 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 217ece6129f2d3b4fdd18d9e79be9e43d8d14a42 – before 11a772d5376aa6d3e2e69b5b5c585f79b60c0e17217ece6129f2d3b4fdd18d9e79be9e43d8d14a42 – before 4c141136a28421b78f34969b25a4fa32e06e2180217ece6129f2d3b4fdd18d9e79be9e43d8d14a42 – before 71fbc3af3dacb26c3aa2f30bb3ab05c44d082c84217ece6129f2d3b4fdd18d9e79be9e43d8d14a42 – before 82bd728a06e55f5b5f93d10ce67f4fe7e689853a217ece6129f2d3b4fdd18d9e79be9e43d8d14a42 – before 92c77807d938145c7c3350c944ef9f39d7f6017c217ece6129f2d3b4fdd18d9e79be9e43d8d14a42 – before a937ef951bba72f48d2402451419d725d70dba20217ece6129f2d3b4fdd18d9e79be9e43d8d14a42 – before 95c8dd79f3a14df96b3820b35b8399bd91b2be60217ece6129f2d3b4fdd18d9e79be9e43d8d14a42 – before 49f683b41f28918df3e51ddc0d928cb2e934ccdb |
| Linux | Linux | 2.6.39 |
References
- https://git.kernel.org/stable/c/11a772d5376aa6d3e2e69b5b5c585f79b60c0e17
- https://git.kernel.org/stable/c/4c141136a28421b78f34969b25a4fa32e06e2180
- https://git.kernel.org/stable/c/71fbc3af3dacb26c3aa2f30bb3ab05c44d082c84
- https://git.kernel.org/stable/c/82bd728a06e55f5b5f93d10ce67f4fe7e689853a
- https://git.kernel.org/stable/c/92c77807d938145c7c3350c944ef9f39d7f6017c
- https://git.kernel.org/stable/c/a937ef951bba72f48d2402451419d725d70dba20
- https://git.kernel.org/stable/c/95c8dd79f3a14df96b3820b35b8399bd91b2be60
- https://git.kernel.org/stable/c/49f683b41f28918df3e51ddc0d928cb2e934ccdb
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html