]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: isotp: isotp_bind(): return -EINVAL on incorrect CAN ID formatting
authorOliver Hartkopp <socketcan@hartkopp.net>
Tue, 31 Oct 2023 09:30:20 +0000 (10:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2023 16:26:48 +0000 (17:26 +0100)
commitf8c3bd211cf358575da40960bac990d799b1eb61
treea7e78d9e37cd1267a4673b5879f70ecaddd314c2
parent615c4dd64050d5c7002ff331b251e29a9cd7fa36
can: isotp: isotp_bind(): return -EINVAL on incorrect CAN ID formatting

commit 2aa39889c463195a0dfe2aff9fad413139c32a4f upstream

Commit 3ea566422cbd ("can: isotp: sanitize CAN ID checks in
isotp_bind()") checks the given CAN ID address information by
sanitizing the input values.

This check (silently) removes obsolete bits by masking the given CAN
IDs.

Derek Will suggested to give a feedback to the application programmer
when the 'sanitizing' was actually needed which means the programmer
provided CAN ID content in a wrong format (e.g. SFF CAN IDs with a CAN
ID > 0x7FF).

Link: https://lore.kernel.org/all/20220515181633.76671-1-socketcan@hartkopp.net
Suggested-by: Derek Will <derekrobertwill@gmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/can/isotp.c