linux-stable/net/can
Oliver Hartkopp d734970817 can: isotp: stop timeout monitoring when no first frame was sent
The first attempt to fix a the 'impossible' WARN_ON_ONCE(1) in
isotp_tx_timer_handler() focussed on the identical CAN IDs created by
the syzbot reproducer and lead to upstream fix/commit 3ea566422c
("can: isotp: sanitize CAN ID checks in isotp_bind()"). But this did
not catch the root cause of the wrong tx.state in the tx_timer handler.

In the isotp 'first frame' case a timeout monitoring needs to be started
before the 'first frame' is send. But when this sending failed the timeout
monitoring for this specific frame has to be disabled too.

Otherwise the tx_timer is fired with the 'warn me' tx.state of ISOTP_IDLE.

Fixes: e057dd3fc2 ("can: add ISO 15765-2:2016 transport protocol")
Link: https://lore.kernel.org/all/20220405175112.2682-1-socketcan@hartkopp.net
Reported-by: syzbot+2339c27f5c66c652843e@syzkaller.appspotmail.com
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-04-17 17:21:22 +02:00
..
j1939 net-timestamp: convert sk->sk_tskey to atomic_t 2022-02-18 11:14:52 +00:00
af_can.c can: Use netif_rx(). 2022-03-06 11:05:31 +00:00
af_can.h
bcm.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
gw.c can: gw: use call_rcu() instead of costly synchronize_rcu() 2022-02-24 08:26:03 +01:00
isotp.c can: isotp: stop timeout monitoring when no first frame was sent 2022-04-17 17:21:22 +02:00
Kconfig
Makefile
proc.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
raw.c