Skip to content

Commit

Permalink
Drivers: hv: vmbus: Initialize request offers message for Isolation VM
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20220105192746.23046-1-juvazq@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
  • Loading branch information
Juan Vazquez authored and Wei Liu committed Jan 5, 2022
1 parent 0bd2fbe commit 6a27e39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hv/channel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6a27e39

Please sign in to comment.