[RAMEN9610-21541]can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices
authorTomas Bortoli <tomasbortoli@gmail.com>
Wed, 31 Jul 2019 14:54:47 +0000 (10:54 -0400)
committerlingsen1 <lingsen1@lenovo.com>
Thu, 23 Apr 2020 10:13:23 +0000 (18:13 +0800)
commit91674133e86fd28e7f83852dc2f0c7487c32ac5c
treec40e2b14971d62a88c9c27085e03c4c5612fd0cc
parent3ad4ca42cfcc6c6a8a33c3d13188a94f2bfe29fe
[RAMEN9610-21541]can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices

commit ead16e53c2f0ed946d82d4037c630e2f60f4ab69 upstream.

Uninitialized Kernel memory can leak to USB devices.

Fix by using kzalloc() instead of kmalloc() on the affected buffers.

Change-Id: I28bc8d26ee60c7a1cee72e0961d58e528f44759f
Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com>
Reported-by: syzbot+d6a5a1a3657b596ef132@syzkaller.appspotmail.com
Fixes: f14e22435a27 ("net: can: peak_usb: Do not do dma on the stack")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/peak_usb/pcan_usb_pro.c