CVE-2023-53756
KVM: VMX: Fix crash due to uninitialized current_vmcs
Check your servers for CVE-2023-53756
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-53756 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
KVM: VMX: Fix crash due to uninitialized current_vmcs
KVM enables 'Enlightened VMCS' and 'Enlightened MSR Bitmap' when running as a nested hypervisor on top of Hyper-V. When MSR bitmap is updated, evmcs_touch_msr_bitmap function uses current_vmcs per-cpu variable to mark that the msr bitmap was changed.
vmx_vcpu_create() modifies the msr bitmap via vmx_disable_intercept_for_msr -> vmx_msr_bitmap_l01_changed which in the end calls this function. The function checks for current_vmcs if it is null but the check is insufficient because current_vmcs is not initialized. Because of this, the code might incorrectly write to the structure pointed by current_vmcs value left by another task. Preemption is not disabled, the current task can be preempted and moved to another CPU while current_vmcs is accessed multiple times from evmcs_touch_msr_bitmap() which leads to crash.
The manipulation of MSR bitmaps by callers happens only for vmcs01 so the solution is to use vmx->vmcs01.vmcs instead of current_vmcs.
BUG: kernel NULL pointer dereference, address: 0000000000000338 PGD 4e1775067 P4D 0 Oops: 0002 [#1] PREEMPT SMP NOPTI ... RIP: 0010:vmx_msr_bitmap_l01_changed+0x39/0x50 [kvm_intel] ... Call Trace: vmx_disable_intercept_for_msr+0x36/0x260 [kvm_intel] vmx_vcpu_create+0xe6/0x540 [kvm_intel] kvm_arch_vcpu_create+0x1d1/0x2e0 [kvm] kvm_vm_ioctl_create_vcpu+0x178/0x430 [kvm] kvm_vm_ioctl+0x53f/0x790 [kvm] __x64_sys_ioctl+0x8a/0xc0 do_syscall_64+0x5c/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd
Exploitation
EPSS 0.20%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 10.8% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from ceef7d10dfb6284d512c499292e6daa35ea83f90, before 6baebcecf09acd19e2bab1c2911dcdba5d48a1dc affected from ceef7d10dfb6284d512c499292e6daa35ea83f90, before 6e7bc50f97c9855da83f1478f722590defd45ff2 affected from ceef7d10dfb6284d512c499292e6daa35ea83f90, before b2de2b4d4e007f9add46ea8dc06f781835e3ea9f affected from ceef7d10dfb6284d512c499292e6daa35ea83f90, before 3ba95cc671c025d0d2a1c7d5e2930f0ff0980cf4 affected from ceef7d10dfb6284d512c499292e6daa35ea83f90, before 93827a0a36396f2fd6368a54a020f420c8916e9b
Other versions: unaffected
|
| Linux |
affected 4.18 unaffected before 4.18 unaffected from 5.10.175 up to and including 5.10.* unaffected from 5.15.103 up to and including 5.15.* unaffected from 6.1.16 up to and including 6.1.* unaffected from 6.2.3 up to and including 6.2.* unaffected 6.3 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-53756 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-53756
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-53756
trivy image --scanners vuln IMAGE | grep CVE-2023-53756
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/6baebcecf09acd19e2bab1c2911dcdba5d48a1dc git.kernel.org
- https://git.kernel.org/stable/c/6e7bc50f97c9855da83f1478f722590defd45ff2 git.kernel.org
- https://git.kernel.org/stable/c/b2de2b4d4e007f9add46ea8dc06f781835e3ea9f git.kernel.org
- https://git.kernel.org/stable/c/3ba95cc671c025d0d2a1c7d5e2930f0ff0980cf4 git.kernel.org
- https://git.kernel.org/stable/c/93827a0a36396f2fd6368a54a020f420c8916e9b git.kernel.org
Source: the record CVE-2023-53756 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse