]> git.baikalelectronics.ru Git - kernel.git/commit
can: j1939: j1939_xtp_rx_dat_one(): cancel session if receive TP.DT with error length
authorZhang Changzhong <zhangchangzhong@huawei.com>
Thu, 30 Sep 2021 03:33:20 +0000 (11:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Oct 2021 07:54:26 +0000 (09:54 +0200)
commitcfb43a70135801ecdd802832dd2f33d0a2c48768
treeaab04f77c41cf73cba15c89a39742798a3ad92da
parent667d7f5fc6d6c7532cd6949d98ec587ad90abb5c
can: j1939: j1939_xtp_rx_dat_one(): cancel session if receive TP.DT with error length

commit 379743985ab6cfe2cbd32067cf4ed497baca6d06 upstream.

According to SAE-J1939-21, the data length of TP.DT must be 8 bytes, so
cancel session when receive unexpected TP.DT message.

Fixes: 877b9bba3266 ("can: add support of SAE J1939 protocol")
Link: https://lore.kernel.org/all/1632972800-45091-1-git-send-email-zhangchangzhong@huawei.com
Cc: stable@vger.kernel.org
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/can/j1939/transport.c