Drivers: hv: vmbus: Copy the hv_message in vmbus_on_msg_dpc()
authorAndrea Parri (Microsoft) <parri.andrea@gmail.com>
Wed, 9 Dec 2020 07:08:24 +0000 (08:08 +0100)
committerWei Liu <wei.liu@kernel.org>
Fri, 5 Feb 2021 09:55:42 +0000 (09:55 +0000)
commitfe8c1b18a27de4d6ca5d99b3ffb3125dc69a5b76
treedd42a4e48da160d4dc2c8a6636350dcfc59117e5
parent9c400d3548c39378327268fb18112b229f91b220
Drivers: hv: vmbus: Copy the hv_message in vmbus_on_msg_dpc()

Since the message is in memory shared with the host, an erroneous or a
malicious Hyper-V could 'corrupt' the message while vmbus_on_msg_dpc()
or individual message handlers are executing.  To prevent it, copy the
message into private memory.

Reported-by: Juan Vazquez <juvazq@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/20201209070827.29335-4-parri.andrea@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/vmbus_drv.c