CVE-2021-47217: x86/hyperv: Fix NULL deref in set_hv_tscchange_cb() if Hyper-V setup fails
In the Linux kernel, the following vulnerability has been resolved:
x86/hyperv: Fix NULL deref in set_hv_tscchange_cb() if Hyper-V setup fails
Check for a valid hv_vp_index array prior to derefencing hv_vp_index when
setting Hyper-V's TSC change callback. If Hyper-V setup failed in
hyperv_init(), the kernel will still report that it's running under
Hyper-V, but will have silently disabled nearly all functionality.
BUG: kernel NULL pointer dereference, address: 0000000000000010
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 [#1] SMP
CPU: 4 PID: 1 Comm: swapper/0 Not tainted 5.15.0-rc2+ #75
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
RIP: 0010:set_hv_tscchange_cb+0x15/0xa0
Code: <8b> 04 82 8b 15 12 17 85 01 48 c1 e0 20 48 0d ee 00 01 00 f6 c6 08
...
Call Trace:
kvm_arch_init+0x17c/0x280
kvm_init+0x31/0x330
vmx_init+0xba/0x13a
do_one_initcall+0x41/0x1c0
kernel_init_freeable+0x1f2/0x23b
kernel_init+0x16/0x120
ret_from_fork+0x22/0x30
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel reliability flaw in Hyper-V-related code. If Hyper-V setup fails but the kernel still believes it is running under Hyper-V, later virtualization initialization can dereference a null pointer and crash the kernel.
Executive priority
Treat as a targeted availability risk for Linux virtualization environments. Prioritize normal kernel patching for affected Hyper-V-adjacent systems, but there is no source-backed evidence of active exploitation or critical business-wide urgency.
Technical view
set_hv_tscchange_cb() could read hv_vp_index without confirming the array was valid. After a failed hyperv_init(), most Hyper-V functionality is disabled, but Hyper-V presence may still be reported. The cited crash occurs during KVM/VMX initialization with a kernel NULL pointer dereference.
Likely exposure
Exposure appears limited to affected Linux kernels in Hyper-V or Hyper-V-presenting environments, especially systems using KVM/VMX initialization after partial Hyper-V setup failure. The source bundle does not identify specific distributions or cloud platforms.
Exploitation context
The bundle does not show active exploitation, KEV listing, public exploit use, or remote attack requirements. Evidence supports a kernel crash condition from a failed setup state, not weaponized exploitation.
Researcher notes
The root issue is missing validation of hv_vp_index before dereference after Hyper-V initialization failure. The affected range and fixed branch details should be confirmed through downstream vendor advisories because the CVE bundle lists upstream stable references, not distro package mappings.
Mitigation direction
Update to a Linux kernel containing the cited stable fixes or a vendor backport.
Check Linux distribution advisories for CVE-2021-47217 package status.
Prioritize Hyper-V guest and virtualization-enabled Linux images.
Avoid assuming unaffected status from version strings alone; verify vendor backports.
Validation and detection
Inventory Linux kernel versions across Hyper-V and virtualization-enabled systems.
Confirm whether vendor kernels include the relevant stable fix commits.
Review kernel logs for NULL dereference traces involving set_hv_tscchange_cb.
Test updated images in Hyper-V-like environments before rollout.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47217 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.