]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: peak_usb: fix shift-out-of-bounds issue
authorStéphane Grosjean <stephane.grosjean@hms-networks.com>
Thu, 18 Sep 2025 13:23:57 +0000 (15:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2025 11:40:38 +0000 (13:40 +0200)
commit176c81cbf9c4e348610a421aad800087c0401f60
tree040a66f6b4814c8b75dc5d8de4b7cb50e3da3ad4
parentca4e51359608e1f29bf1f2c33c3ddf775b6b7ed1
can: peak_usb: fix shift-out-of-bounds issue

[ Upstream commit c443be70aaee42c2d1d251e0329e0a69dd96ae54 ]

Explicitly uses a 64-bit constant when the number of bits used for its
shifting is 32 (which is the case for PC CAN FD interfaces supported by
this driver).

Signed-off-by: Stéphane Grosjean <stephane.grosjean@hms-networks.com>
Link: https://patch.msgid.link/20250918132413.30071-1-stephane.grosjean@free.fr
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Closes: https://lore.kernel.org/20250917-aboriginal-refined-honeybee-82b1aa-mkl@pengutronix.de
Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core")
[mkl: update subject, apply manually]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/usb/peak_usb/pcan_usb_core.c