linux-stable/net/can/j1939
Dmitry Antipov a8c695005b can: j1939: j1939_session_new(): fix skb reference counting
Since j1939_session_skb_queue() does an extra skb_get() for each new
skb, do the same for the initial one in j1939_session_new() to avoid
refcount underflow.

Reported-by: syzbot+d4e8dc385d9258220c31@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=d4e8dc385d9258220c31
Fixes: 9d71dd0c70 ("can: add support of SAE J1939 protocol")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20241105094823.2403806-1-dmantipov@yandex.ru
[mkl: clean up commit message]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2024-12-02 09:53:39 +01:00
..
address-claim.c can: j1939: do not wait 250 ms if the same addr was already claimed 2023-02-07 15:00:22 +01:00
bus.c can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
j1939-priv.h can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER) 2024-02-14 13:53:03 +01:00
Kconfig can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
main.c net: can: j1939: Initialize unused data in j1939_send_one() 2024-06-21 10:50:15 +02:00
Makefile can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
socket.c can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER) 2024-02-14 13:53:03 +01:00
transport.c can: j1939: j1939_session_new(): fix skb reference counting 2024-12-02 09:53:39 +01:00