Skip to content

Commit 8600d42

Browse files
Tomas BortoliBrian Maly
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]> Orabug: 31351221 CVE: CVE-2019-19535 (cherry picked from commit 30a8bee) Signed-off-by: Dan Duval <[email protected]> Reviewed-by: Jack Vogel <[email protected]> Signed-off-by: Brian Maly <[email protected]>
1 parent 7dc53ee commit 8600d42

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
@@ -850,7 +850,7 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev)
850850
goto err_out;
851851

852852
/* allocate command buffer once for all for the interface */
853-
pdev->cmd_buffer_addr = kmalloc(PCAN_UFD_CMD_BUFFER_SIZE,
853+
pdev->cmd_buffer_addr = kzalloc(PCAN_UFD_CMD_BUFFER_SIZE,
854854
GFP_KERNEL);
855855
if (!pdev->cmd_buffer_addr)
856856
goto err_out_1;

0 commit comments

Comments
 (0)