]> git.baikalelectronics.ru Git - kernel.git/commit
can: j1939: j1939_send_one(): fix missing CAN header initialization
authorOliver Hartkopp <socketcan@hartkopp.net>
Fri, 4 Nov 2022 07:50:00 +0000 (08:50 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 7 Nov 2022 13:00:27 +0000 (14:00 +0100)
commit4ef2b27814173e80c0c53777fca385a04a71aa42
tree640a7c8d17ad66b6e8d11138fd612b970d6c86b5
parent608b14e6671ef120c9702b9811fbfcd5fbe98060
can: j1939: j1939_send_one(): fix missing CAN header initialization

The read access to struct canxl_frame::len inside of a j1939 created
skbuff revealed a missing initialization of reserved and later filled
elements in struct can_frame.

This patch initializes the 8 byte CAN header with zero.

Fixes: c4da2dabb66d ("can: add support of SAE J1939 protocol")
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/linux-can/20221104052235.GA6474@pengutronix.de
Reported-by: syzbot+d168ec0caca4697e03b1@syzkaller.appspotmail.com
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20221104075000.105414-1-socketcan@hartkopp.net
Cc: stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/j1939/main.c