------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 3319 at lib/refcount.c:28 refcount_warn_saturate+0xad/0x130 lib/refcount.c:28 Modules linked in: CPU: 1 UID: 0 PID: 3319 Comm: syz.0.15 Not tainted 6.10.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 RIP: 0010:refcount_warn_saturate+0xad/0x130 lib/refcount.c:28 Code: 59 ff 90 0f 0b 90 90 c3 cc cc cc cc 80 3d b1 cb 3f 02 00 75 97 c6 05 a8 cb 3f 02 01 90 48 c7 c7 a0 1a 91 83 e8 04 08 59 ff 90 <0f> 0b 90 90 c3 cc cc cc cc 80 3d 87 cb 3f 02 00 0f 85 6c ff ff ff RSP: 0018:ffffc900000e8cd0 EFLAGS: 00010246 RAX: 3d54262b5fa0aa00 RBX: ffff8881053fcf00 RCX: 0000000000000103 RDX: 0000000000000002 RSI: 00000000ffffdfff RDI: 00000000ffffffff RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff83cd0040 R10: ffffc900000e8ba8 R11: ffffc900000e8b50 R12: ffff888106702a10 R13: 0000000000000000 R14: ffff888109b71c00 R15: ffff888109b71c68 FS: 00007f00977af6c0(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3545a81440 CR3: 00000001053b2000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kfree_skb_reason include/linux/skbuff.h:1260 [inline] kfree_skb include/linux/skbuff.h:1269 [inline] j1939_session_destroy net/can/j1939/transport.c:282 [inline] __j1939_session_release net/can/j1939/transport.c:294 [inline] kref_put include/linux/kref.h:65 [inline] j1939_session_put+0xa5/0x190 net/can/j1939/transport.c:299 j1939_tp_cmd_recv net/can/j1939/transport.c:2113 [inline] j1939_tp_recv+0x2c9/0x4b0 net/can/j1939/transport.c:2161 j1939_can_recv+0x1e4/0x290 net/can/j1939/main.c:108 deliver net/can/af_can.c:572 [inline] can_rcv_filter+0x80/0x190 net/can/af_can.c:606 can_receive+0xca/0x110 net/can/af_can.c:663 can_rcv+0x4b/0x90 net/can/af_can.c:687 __netif_receive_skb_one_core net/core/dev.c:5660 [inline] __netif_receive_skb+0xa8/0x160 net/core/dev.c:5774 process_backlog+0x203/0x520 net/core/dev.c:6107 __napi_poll+0x28/0x160 net/core/dev.c:6771 napi_poll net/core/dev.c:6840 [inline] net_rx_action+0x275/0x480 net/core/dev.c:6962 handle_softirqs+0x118/0x390 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0x45/0xc0 kernel/softirq.c:637 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x92/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x59/0xb0 kernel/locking/spinlock.c:194 Code: df e8 9b d7 48 fe 48 c7 04 24 00 00 00 00 9c 8f 04 24 f7 04 24 00 02 00 00 75 3b 41 f7 c6 00 02 00 00 74 01 fb bf 01 00 00 00 32 3b 45 fe 65 8b 05 e3 03 2f 7d 85 c0 74 2c 65 48 8b 04 25 28 RSP: 0018:ffffc900036cbbf8 EFLAGS: 00000206 RAX: 0000000000000001 RBX: ffff888237d20440 RCX: 0000000000000001 RDX: ffffffff83c72e30 RSI: ffffffff838588bc RDI: 0000000000000001 RBP: ffff888106b6c800 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: ffffffff810700a0 R12: ffffc900036cbd50 R13: 0000000000000009 R14: 0000000000000282 R15: 0000000000000009 j1939_sk_send_loop net/can/j1939/socket.c:1164 [inline] j1939_sk_sendmsg+0x425/0x570 net/can/j1939/socket.c:1277 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x8e/0xb0 net/socket.c:745 ____sys_sendmsg+0x1a7/0x200 net/socket.c:2597 ___sys_sendmsg net/socket.c:2651 [inline] __sys_sendmsg+0x2c7/0x310 net/socket.c:2680 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xe0/0x220 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f00969773b9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f00977af048 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f0096b05f80 RCX: 00007f00969773b9 RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003 RBP: 00007f00969e48e6 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f0096b05f80 R15: 00007fffbad957f8 ---------------- Code disassembly (best guess): 0: df e8 fucomip %st(0),%st 2: 9b fwait 3: d7 xlat %ds:(%rbx) 4: 48 fe 48 c7 rex.W decb -0x39(%rax) 8: 04 24 add $0x24,%al a: 00 00 add %al,(%rax) c: 00 00 add %al,(%rax) e: 9c pushf f: 8f 04 24 pop (%rsp) 12: f7 04 24 00 02 00 00 testl $0x200,(%rsp) 19: 75 3b jne 0x56 1b: 41 f7 c6 00 02 00 00 test $0x200,%r14d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 32 3b 45 fe call 0xfe453b61 <-- trapping instruction 2f: 65 8b 05 e3 03 2f 7d mov %gs:0x7d2f03e3(%rip),%eax # 0x7d2f0419 36: 85 c0 test %eax,%eax 38: 74 2c je 0x66 3a: 65 gs 3b: 48 rex.W 3c: 8b .byte 0x8b 3d: 04 25 add $0x25,%al 3f: 28 .byte 0x28