Linux kernel infinite retry loop in Hyper-V VP index initialization
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6640b5df1a38801be6d0595c8cd2177d968d7ee0 · < 32ea0a33e3a0fb7c10c601b43e1b2f6c06a3f5fd| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Drivers: hv: Avoid infinite retry loop in init_vp_index()
There is a retry loop in init_vp_index() where the CPUs from a certain node are stripped out if they have already been in the allocated cpumask or not in HK_TYPE_MANAGED_IRQ housekeeping cpumask. If there is no CPU left, the allocated cpumask is ignored and the process is retried again. However, if the HK_TYPE_MANAGED_IRQ housekeeping cpumask turns out not to contain any CPU in that particular node, that will become an infinite retry loop. This particular problem was reported by sashiko [1]. This should rarely happen, but we still need to guard against this.
Fix this infinite loop problem by also skipping NUMA node that has no housekeeping CPU in the inner while loop of init_vp_index(). Also update the early abort check to check for the absence of online housekeeping CPUs instead of just the emptiness of the cpumask. As the outer for loop will only be reached if the housekeeping cpumask has at least one online CPU, a NUMA node with housekeeping CPUs will eventually be found.
From the CVE record · Linux
The Linux kernel's Hyper-V driver can enter an infinite retry loop in init_vp_index() when a NUMA node has no CPUs in the managed-IRQ housekeeping mask. The input does not describe an attacker-controlled trigger, authentication requirements, or user interaction.
Engineers running the Linux kernel should check affected versions against the vendor advisory; no version range was provided.