Drivers: hv: vmbus: Skip VMBus module cleanup for non-nested root partition
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7e279d78664aa91107ebff4b03eca367967f5908 · < cee0d90bceae1dee3bcc70f8d6b2ceb5b87deb42| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Drivers: hv: vmbus: Skip VMBus module cleanup for non-nested root partition
The VMBus module initialization function, hv_acpi_init(), currently does nothing when running in the root partition and root is not nested in another VM. But the initialization function reports success, so the VMBus module is indeed loaded. VMBus functionality is not actually needed, but the VMBus module must be loaded so that hv_vmbus_exists() can answer correctly. Furthermore, the mshv_root dependency on the VMBus module is needed as described in the commit message for 840b740a35bf ("mshv: Add conditional VMBus dependency").
Loading the VMBus module without actually initializing it causes failures if the module should later be unloaded. The module unload code tries to clean up things that were never initialized, resulting in memory faults and a panic.
Fix this by having VMBus module exit function perform the same check for non-nested root partition, and do nothing in such a case, just like hv_acpi_init().
In the long run, the code that manages the Hyper-V provided SynIC should be refactored to better coordinate the requirements of root partition scenarios and normal VM scenarios, and to hopefully remove the hv_vmbus_exists() dependnecy between mshv_root and VMBus modules. Preventing the current unload failure scenario is an expediency until such a refactoring is done.
From the CVE record · Linux
In a non-nested Hyper-V root partition, the Linux kernel can load the VMBus module without initializing it. If the module is later unloaded, cleanup of uninitialized resources can cause memory faults and a kernel panic. The input does not describe an attacker path, authentication requirement, or user interaction.
Operators running Linux kernels in non-nested Hyper-V root partitions should check whether their kernel includes the VMBus cleanup fix; affected versions are not specified.