Skip to content

Commit 30a8bee

Browse files
Tomas Bortolimarckleinebudde
authored andcommitted
can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices
Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli <[email protected]> Reported-by: [email protected] Fixes: 0a25e1f ("can: peak_usb: add support for PEAK new CANFD USB adapters") Cc: linux-stable <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent e787f19 commit 30a8bee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/can/usb/peak_usb/pcan_usb_fd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev)
841841
goto err_out;
842842

843843
/* allocate command buffer once for all for the interface */
844-
pdev->cmd_buffer_addr = kmalloc(PCAN_UFD_CMD_BUFFER_SIZE,
844+
pdev->cmd_buffer_addr = kzalloc(PCAN_UFD_CMD_BUFFER_SIZE,
845845
GFP_KERNEL);
846846
if (!pdev->cmd_buffer_addr)
847847
goto err_out_1;

0 commit comments

Comments
 (0)