linux_dsm_epyc7002/drivers/net/can/usb
Dan Carpenter a6921dd524 can: peak_usb: add range checking in decode operations
These values come from skb->data so Smatch considers them untrusted.  I
believe Smatch is correct but I don't have a way to test this.

The usb_if->dev[] array has 2 elements but the index is in the 0-15
range without checks.  The cfd->len can be up to 255 but the maximum
valid size is CANFD_MAX_DLEN (64) so that could lead to memory
corruption.

Fixes: 0a25e1f4f1 ("can: peak_usb: add support for PEAK new CANFD USB adapters")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200813140604.GA456946@mwanda
Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-11-03 22:30:32 +01:00
..
kvaser_usb can: kvaser_usb: fix interface sanity check 2020-01-02 15:34:27 +01:00
peak_usb can: peak_usb: add range checking in decode operations 2020-11-03 22:30:32 +01:00
ems_usb.c
esd_usb2.c
gs_usb.c can: drivers: fix spelling mistakes 2020-09-21 10:13:16 +02:00
Kconfig can: drivers: fix spelling mistakes 2020-09-21 10:13:16 +02:00
Makefile
mcba_usb.c can: mcba_usb: remove redundant initialization of variable err 2020-09-21 10:13:17 +02:00
ucan.c can: drivers: fix spelling mistakes 2020-09-21 10:13:16 +02:00
usb_8dev.c can: drivers: fix spelling mistakes 2020-09-21 10:13:16 +02:00