1
0
Fork 0
alistair23-linux/drivers/net/can/usb/peak_usb
Colin Ian King 73788e8c3b can: peak_usb: fix potential integer overflow on shift of a int
[ Upstream commit 8a68cc0d69 ]

The left shift of int 32 bit integer constant 1 is evaluated using 32 bit
arithmetic and then assigned to a signed 64 bit variable. In the case where
time_ref->adapter->ts_used_bits is 32 or more this can lead to an oveflow.
Avoid this by shifting using the BIT_ULL macro instead.

Fixes: bb4785551f ("can: usb: PEAK-System Technik USB adapters driver core")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201105112427.40688-1-colin.king@canonical.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-24 13:29:06 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
pcan_usb.c can: peak_usb: report bus recovery as well 2019-11-04 21:47:20 +01:00
pcan_usb_core.c can: peak_usb: fix potential integer overflow on shift of a int 2020-11-24 13:29:06 +01:00
pcan_usb_core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
pcan_usb_fd.c can: peak_usb: add range checking in decode operations 2020-11-18 19:20:19 +01:00
pcan_usb_pro.c can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices 2019-08-02 13:58:01 +02:00
pcan_usb_pro.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00