------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 6945 at lib/refcount.c:28 refcount_warn_saturate+0x1c8/0x20c lib/refcount.c:28 Modules linked in: CPU: 1 UID: 0 PID: 6945 Comm: syz.4.101 Not tainted 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x1c8/0x20c lib/refcount.c:28 lr : refcount_warn_saturate+0x1c8/0x20c lib/refcount.c:28 sp : ffff8000800176f0 x29: ffff8000800176f0 x28: dfff800000000000 x27: ffff0000da561724 x26: ffff0000da561640 x25: 00000000000006f9 x24: 0000000000000000 x23: ffff0000da561724 x22: ffff80008a6453b8 x21: 0000000000000003 x20: ffff0000da561724 x19: ffff800092b74000 x18: 0000000000000008 x17: 0000000000000000 x16: ffff8000831615b0 x15: 0000000000000001 x14: 1fffe000366c80e2 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000102 x10: 0000000000ff0100 x9 : 0f4934803918a300 x8 : 0f4934803918a300 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff800080016e18 x4 : ffff80008f9bd220 x3 : ffff800080626d8c x2 : 0000000000000001 x1 : 0000000000000100 x0 : 0000000000000000 Call trace: refcount_warn_saturate+0x1c8/0x20c lib/refcount.c:28 (P) refcount_warn_saturate+0x1c8/0x20c lib/refcount.c:28 (L) __refcount_sub_and_test include/linux/refcount.h:275 [inline] __refcount_dec_and_test include/linux/refcount.h:307 [inline] refcount_dec_and_test include/linux/refcount.h:325 [inline] skb_unref include/linux/skbuff.h:1232 [inline] __sk_skb_reason_drop net/core/skbuff.c:1213 [inline] sk_skb_reason_drop+0x210/0x43c net/core/skbuff.c:1241 kfree_skb_reason include/linux/skbuff.h:1262 [inline] kfree_skb include/linux/skbuff.h:1271 [inline] j1939_session_skb_drop_old net/can/j1939/transport.c:347 [inline] j1939_xtp_rx_cts_one net/can/j1939/transport.c:1445 [inline] j1939_xtp_rx_cts+0x464/0xafc net/can/j1939/transport.c:1484 j1939_tp_cmd_recv net/can/j1939/transport.c:2089 [inline] j1939_tp_recv+0x730/0xe14 net/can/j1939/transport.c:2161 j1939_can_recv+0x5bc/0x934 net/can/j1939/main.c:108 deliver net/can/af_can.c:572 [inline] can_rcv_filter+0x308/0x714 net/can/af_can.c:606 can_receive+0x328/0x488 net/can/af_can.c:663 can_rcv+0x128/0x240 net/can/af_can.c:687 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x18c/0x3c8 net/core/dev.c:5783 process_backlog+0x640/0x123c net/core/dev.c:6115 __napi_poll+0xb4/0x3fc net/core/dev.c:6779 napi_poll net/core/dev.c:6848 [inline] net_rx_action+0x6a8/0xf4c net/core/dev.c:6970 handle_softirqs+0x2e0/0xbf8 kernel/softirq.c:554 __do_softirq+0x14/0x20 kernel/softirq.c:588 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:81 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:891 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:86 invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x1d8/0x544 kernel/softirq.c:655 irq_exit_rcu+0x14/0x84 kernel/softirq.c:671 __el1_irq arch/arm64/kernel/entry-common.c:561 [inline] el1_interrupt+0x38/0x68 arch/arm64/kernel/entry-common.c:575 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:580 el1h_64_irq+0x6c/0x70 arch/arm64/kernel/entry.S:596 _compound_head include/linux/page-flags.h:242 [inline] (P) virt_to_folio include/linux/mm.h:1296 [inline] (P) virt_to_slab mm/slab.h:206 [inline] (P) qlink_to_cache mm/kasan/quarantine.c:131 [inline] (P) qlist_free_all+0x78/0xb8 mm/kasan/quarantine.c:176 (P) virt_to_phys arch/arm64/include/asm/memory.h:370 [inline] (L) virt_to_pfn arch/arm64/include/asm/memory.h:384 [inline] (L) virt_to_folio include/linux/mm.h:1294 [inline] (L) virt_to_slab mm/slab.h:206 [inline] (L) qlink_to_cache mm/kasan/quarantine.c:131 [inline] (L) qlist_free_all+0x64/0xb8 mm/kasan/quarantine.c:176 (L) kasan_quarantine_reduce+0x118/0x124 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x2c/0x8c mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] kmem_cache_alloc_node_noprof+0x204/0x3a8 mm/slub.c:4186 __alloc_skb+0x1e0/0x420 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1322 [inline] alloc_skb_with_frags+0xc8/0x644 net/core/skbuff.c:6612 sock_alloc_send_pskb+0x76c/0x884 net/core/sock.c:2889 sock_alloc_send_skb include/net/sock.h:1782 [inline] j1939_sk_alloc_skb net/can/j1939/socket.c:878 [inline] j1939_sk_send_loop net/can/j1939/socket.c:1142 [inline] j1939_sk_sendmsg+0x604/0x10d0 net/can/j1939/socket.c:1277 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg net/socket.c:744 [inline] ____sys_sendmsg+0x56c/0x840 net/socket.c:2607 ___sys_sendmsg net/socket.c:2661 [inline] __sys_sendmsg+0x26c/0x33c net/socket.c:2690 __do_sys_sendmsg net/socket.c:2699 [inline] __se_sys_sendmsg net/socket.c:2697 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2697 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 irq event stamp: 26425 hardirqs last enabled at (26424): [] __up_console_sem kernel/printk/printk.c:344 [inline] hardirqs last enabled at (26424): [] __console_unlock+0x70/0xc4 kernel/printk/printk.c:2844 hardirqs last disabled at (26425): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:488 softirqs last enabled at (26374): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (26374): [] handle_softirqs+0xa38/0xbf8 kernel/softirq.c:582 softirqs last disabled at (26383): [] __do_softirq+0x14/0x20 kernel/softirq.c:588 ---[ end trace 0000000000000000 ]--- vcan0: j1939_tp_rxtimer: 0x00000000c016196d: rx timeout, send abort vcan0: j1939_tp_rxtimer: 0x00000000c2888922: rx timeout, send abort vcan0: j1939_xtp_rx_abort_one: 0x00000000c016196d: 0x00000: (3) A timeout occurred and this is the connection abort to close the session. vcan0: j1939_xtp_rx_abort_one: 0x00000000c2888922: 0x00000: (3) A timeout occurred and this is the connection abort to close the session.