can: peak_usb: fix slab info leak
authorJohan Hovold <johan@kernel.org>
Wed, 23 Oct 2019 08:27:05 +0000 (10:27 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 10 Dec 2019 18:01:38 +0000 (18:01 +0000)
commitf13615187cd8069c0f1c492e8f244a0c69d0663e
treea988ce77012da17765ae2c11c6af8f7bf4fdeb0b
parent89577bea6adf8cd2a1b97c91f7266bb56aa181b0
can: peak_usb: fix slab info leak

commit f7a1337f0d29b98733c8824e165fca3371d7d4fd upstream.

Fix a small slab info leak due to a failure to clear the command buffer
at allocation.

The first 16 bytes of the command buffer are always sent to the device
in pcan_usb_send_cmd() even though only the first two may have been
initialised in case no argument payload is provided (e.g. when waiting
for a response).

Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core")
Reported-by: syzbot+863724e7128e14b26732@syzkaller.appspotmail.com
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/can/usb/peak_usb/pcan_usb_core.c