Linux-HyperV List
 help / color / mirror / Atom feed
* [PATCH] Drivers: hv: vmbus: Initialize request offers message for Isolation VM
@ 2022-01-05 19:27 Juan Vazquez
  2022-01-05 20:39 ` Wei Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Juan Vazquez @ 2022-01-05 19:27 UTC (permalink / raw)
  To: kys, haiyangz, sthemmin, wei.liu, decui, mikelley
  Cc: linux-hyperv, linux-kernel

Initialize memory of request offers message to be sent to the host so
padding or uninitialized fields do not leak guest memory contents.

Signed-off-by: Juan Vazquez <juvazq@linux.microsoft.com>
---
 drivers/hv/channel_mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 2829575fd9b7..60375879612f 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -1554,7 +1554,7 @@ int vmbus_request_offers(void)
 	struct vmbus_channel_msginfo *msginfo;
 	int ret;
 
-	msginfo = kmalloc(sizeof(*msginfo) +
+	msginfo = kzalloc(sizeof(*msginfo) +
 			  sizeof(struct vmbus_channel_message_header),
 			  GFP_KERNEL);
 	if (!msginfo)
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-05 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-05 19:27 [PATCH] Drivers: hv: vmbus: Initialize request offers message for Isolation VM Juan Vazquez
2022-01-05 20:39 ` Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox