]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 12:59:24 +0000 (13:59 +0100)
commit683a3eb60cfaa1bf255c87fbdd1db002f050f531
treec5ec0f5b9c8c94940d84707f8020854c80fcdd5d
parent653b147b38d7a51732b556aa8045d8a0adde3f68
can: j1939: j1939_send_one(): fix missing CAN header initialization

commit 3eb3d283e8579a22b81dd2ac3987b77465b2a22f upstream.

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: 9d71dd0c7009 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 69e86c6268d59ceddd0abe9ae8f1f5296f316c3c)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
net/can/j1939/main.c