Skip to content

Commit

Permalink
misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_c…
Browse files Browse the repository at this point in the history
…tx_get_chkpt_doorbells()

A kernel-infoleak was reported by syzbot, which was caused because
dbells was left uninitialized.
Using kzalloc() instead of kmalloc() fixes this issue.

Reported-by: [email protected]
Tested-by: [email protected]
Signed-off-by: Anant Thazhemadam <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
thazhemadam authored and gregkh committed Dec 9, 2020
1 parent 997754f commit 31dcb6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/vmw_vmci/vmci_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ static int vmci_ctx_get_chkpt_doorbells(struct vmci_ctx *context,
return VMCI_ERROR_MORE_DATA;
}

dbells = kmalloc(data_size, GFP_ATOMIC);
dbells = kzalloc(data_size, GFP_ATOMIC);
if (!dbells)
return VMCI_ERROR_NO_MEM;

Expand Down

0 comments on commit 31dcb6c

Please sign in to comment.