]> git.baikalelectronics.ru Git - kernel.git/commit
can: isotp: isotp_bind(): return -EINVAL on incorrect CAN ID formatting
authorOliver Hartkopp <socketcan@hartkopp.net>
Sun, 15 May 2022 18:16:33 +0000 (20:16 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 16 May 2022 20:03:45 +0000 (22:03 +0200)
commitd3d6c82ec1630f88e9505cf454176264402d5bca
tree4348b21ee3f6acfe0475c4afd43409d0828c9914
parent58d5404ddc9cbfe058449495d66ce722ef5bc040
can: isotp: isotp_bind(): return -EINVAL on incorrect CAN ID formatting

Commit 0d7a4a9ad3db ("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>
net/can/isotp.c