pcan_usb_fd: zero out the common command buffer
Subsystems (3)
PATCH 1/1 pcan_usb_fd: zero out the common command buffer
Lest we leak kernel memory to a device we better zero out buffers.
--- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/usb/peak_usb/pcan_usb_fd.c +1 -1
@@ -841,7 +841,7 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev) goto err_out;/* allocate command buffer once for all for the interface */ - pdev->cmd_buffer_addr =kmalloc (PCAN_UFD_CMD_BUFFER_SIZE , + pdev->cmd_buffer_addr =kzalloc (PCAN_UFD_CMD_BUFFER_SIZE ,GFP_KERNEL );if (!pdev->cmd_buffer_addr) goto err_out_1;
Signature · 1 line
2.16.4
David Miller
maintainerFrom: Oliver Neukum <[email protected]>
Date: Thu, 8 Aug 2019 11:28:25 +0200
Quoted 4 lines
Lest we leak kernel memory to a device we better zero out buffers.
Reported-by [email protected]Signed-off-by Oliver Neukum <[email protected]>
Please CC: the CAN subsystem maintainers, as this is clearly listed in the MAINTAINERS file.
Thank you.
Quoted 20 lines
--- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/can/usb/peak_usb/pcan_usb_fd.c +1
-1@@ -841,7 +841,7 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev) goto err_out;/* allocate command buffer once for all for the interface */ - pdev->cmd_buffer_addr =kmalloc (PCAN_UFD_CMD_BUFFER_SIZE , + pdev->cmd_buffer_addr =kzalloc (PCAN_UFD_CMD_BUFFER_SIZE ,GFP_KERNEL );if (!pdev->cmd_buffer_addr) goto err_out_1;Signature · 1 line
2.16.4
Marc Kleine-Budde
maintainerQuoted 10 lines · David Miller
From: Oliver Neukum <[email protected]>
Date: Thu, 8 Aug 2019 11:28:25 +0200Quoted 4 lines
Lest we leak kernel memory to a device we better zero out buffers.
Reported-by [email protected]Signed-off-by Oliver Neukum <[email protected]>Please CC: the CAN subsystem maintainers, as this is clearly listed in the
MAINTAINERSfile.
The issue is already fixed and already mainline ([email protected] is on Cc):
30a8beeb3042 can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |