linux-stable/net/can
Oliver Hartkopp 69e86c6268 can: j1939: j1939_send_one(): fix missing CAN header initialization
commit 3eb3d283e8 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: 9d71dd0c70 ("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>
2022-11-16 09:58:28 +01:00
..
j1939 can: j1939: j1939_send_one(): fix missing CAN header initialization 2022-11-16 09:58:28 +01:00
af_can.c can: af_can: fix NULL pointer dereference in can_rx_register() 2022-11-16 09:58:19 +01:00
af_can.h can: introduce CAN midlayer private and allocate it automatically 2019-09-04 13:29:14 +02:00
bcm.c can: bcm: check the result of can_send() in bcm_can_tx() 2022-10-26 12:35:36 +02:00
gw.c can: gw: synchronize rcu operations before removing gw job entry 2021-06-19 23:53:43 +02:00
isotp.c can: isotp: remove re-binding of bound socket 2022-05-12 12:30:09 +02:00
Kconfig net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
Makefile can: add ISO 15765-2:2016 transport protocol 2020-10-07 23:18:33 +02:00
proc.c can: proc: remove unnecessary variables 2021-05-27 09:42:21 +02:00
raw.c net: Remove redundant if statements 2021-08-05 13:27:50 +01:00