Skip to content

Commit 31dcb6c

Browse files
thazhemadamgregkh
authored andcommitted
misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_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: syzbot+a79e17c39564bedf0930@syzkaller.appspotmail.com Tested-by: syzbot+a79e17c39564bedf0930@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com> Link: https://lore.kernel.org/r/20201122224534.333471-1-anant.thazhemadam@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 997754f commit 31dcb6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/misc/vmw_vmci/vmci_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ static int vmci_ctx_get_chkpt_doorbells(struct vmci_ctx *context,
743743
return VMCI_ERROR_MORE_DATA;
744744
}
745745

746-
dbells = kmalloc(data_size, GFP_ATOMIC);
746+
dbells = kzalloc(data_size, GFP_ATOMIC);
747747
if (!dbells)
748748
return VMCI_ERROR_NO_MEM;
749749

0 commit comments

Comments
 (0)