Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ead16e53 authored by Tomas Bortoli's avatar Tomas Bortoli Committed by Marc Kleine-Budde
Browse files

can: peak_usb: pcan_usb_pro: 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: default avatarTomas Bortoli <tomasbortoli@gmail.com>
Reported-by: default avatar <syzbot+d6a5a1a3657b596ef132@syzkaller.appspotmail.com>
Fixes: f14e2243 ("net: can: peak_usb: Do not do dma on the stack")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 30a8beeb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -494,7 +494,7 @@ static int pcan_usb_pro_drv_loaded(struct peak_usb_device *dev, int loaded)
	u8 *buffer;
	int err;

	buffer = kmalloc(PCAN_USBPRO_FCT_DRVLD_REQ_LEN, GFP_KERNEL);
	buffer = kzalloc(PCAN_USBPRO_FCT_DRVLD_REQ_LEN, GFP_KERNEL);
	if (!buffer)
		return -ENOMEM;