android_kernel_xiaomi_sm8350/net/can
Fedor Pchelkin 04e41b6bac can: j1939: j1939_session_destroy(): fix memory leak of skbs
commit 8c21c54a53ab21842f5050fa090f26b03c0313d6 upstream.

We need to drop skb references taken in j1939_session_skb_queue() when
destroying a session in j1939_session_destroy(). Otherwise those skbs
would be lost.

Link to Syzkaller info and repro: https://forge.ispras.ru/issues/11743.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

V1: https://lore.kernel.org/all/20220708175949.539064-1-pchelkin@ispras.ru

Fixes: 9d71dd0c70 ("can: add support of SAE J1939 protocol")
Suggested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/all/20220805150216.66313-1-pchelkin@ispras.ru
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-25 11:18:39 +02:00
..
j1939 can: j1939: j1939_session_destroy(): fix memory leak of skbs 2022-08-25 11:18:39 +02:00
af_can.c
af_can.h
bcm.c can: bcm: use call_rcu() instead of costly synchronize_rcu() 2022-07-12 16:30:46 +02:00
gw.c
Kconfig
Makefile
proc.c
raw.c