diff options
author | Andrea Parri (Microsoft) <parri.andrea@gmail.com> | 2021-04-20 03:43:50 +0200 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2021-04-20 21:40:17 +0200 |
commit | 8c2d5e0640e53c14b6240e9bf1e32a2226e6e6ca (patch) | |
tree | f8e4d1c4f267e9a092d17105f848fe93831ca393 /drivers/hv/connection.c | |
parent | Drivers: hv: vmbus: Check for pending channel interrupts before taking a CPU ... (diff) | |
download | linux-8c2d5e0640e53c14b6240e9bf1e32a2226e6e6ca.tar.xz linux-8c2d5e0640e53c14b6240e9bf1e32a2226e6e6ca.zip |
Drivers: hv: vmbus: Initialize unload_event statically
If a malicious or compromised Hyper-V sends a spurious message of type
CHANNELMSG_UNLOAD_RESPONSE, the function vmbus_unload_response() will
call complete() on an uninitialized event, and cause an oops.
Reported-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20210420014350.2002-1-parri.andrea@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r-- | drivers/hv/connection.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index dc19d5ae4373..311cd005b3be 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -26,6 +26,8 @@ struct vmbus_connection vmbus_connection = { .conn_state = DISCONNECTED, + .unload_event = COMPLETION_INITIALIZER( + vmbus_connection.unload_event), .next_gpadl_handle = ATOMIC_INIT(0xE1E10), .ready_for_suspend_event = COMPLETION_INITIALIZER( |