CVE-2026-99216: Drivers: hv: Don't reset VMBus connection state on error/exit paths
In the Linux kernel, the following vulnerability has been resolved:
Drivers: hv: Don't reset VMBus connection state on error/exit paths
In two places, current code forces vmbusconnection.connstate to DISCONNECTED prior to calling vmbusdisconnect(). But vmbusdisconnect() calls vmbusinitiateunload(), which unloads the VMBus connection only if the connstate is CONNECTED. Consequently, the connection remains and the Hyper-V host might continue to send messages or post VMBus interrupts.
The problem was introduced in commit 74347a99e73ae ("x86/Hyper-V: Unload vmbus channel in hv panic callback"), in that vmbusinitiateunload() started checking the current connection state before doing the unload. This commit removed some occurrences where connstate was forced to DISCONNECTED, but these two remained, apparently due to an oversight at the time.
Fix this by not forcing connstate to DISCONNECTED during VMBus exit, or if a failure occurs when establishing the connection in the first place. Whatever value connstate has at the time is then read by vmbusinitiateunload() to determine if there is a connection to be unloaded.