program: r0 = socket$can_j1939(0x1d, 0x2, 0x7) ioctl$ifreq_SIOCGIFINDEX_vcan(r0, 0x8933, &(0x7f0000000040)={'vxcan0\x00', 0x0}) bind$can_j1939(r0, &(0x7f0000000080)={0x1d, r1}, 0x18) r2 = socket$can_j1939(0x1d, 0x2, 0x7) ioctl$ifreq_SIOCGIFINDEX_vcan(r2, 0x8933, &(0x7f00000000c0)={'vxcan1\x00', 0x0}) bind$can_j1939(r2, &(0x7f0000000100)={0x1d, r3}, 0x18) connect$can_j1939(r2, &(0x7f0000000140)={0x1d, r3}, 0x18) sendmsg$can_j1939(r2, &(0x7f0000000180)={0x0, 0x0, &(0x7f00000001c0)={&(0x7f0000000200)='data', 0x4}}, 0x0) recvmsg$can_j1939(r0, &(0x7f0000000240)={0x0, 0x0, &(0x7f0000000280)=[{&(0x7f00000002c0)=""/4, 0x4}], 0x1}, 0x0) [ 57.352079][ T5318] ------------[ cut here ]------------ [ 57.354581][ T5318] refcount_t: underflow; use-after-free. [ 57.364716][ T5318] WARNING: CPU: 0 PID: 5318 at lib/refcount.c:28 refcount_warn_saturate+0x15a/0x1d0 [ 57.370192][ T5318] Modules linked in: [ 57.371730][ T5318] CPU: 0 UID: 0 PID: 5318 Comm: syz.0.0 Not tainted 6.13.0-rc1-syzkaller-00025-gfeffde684ac2 #0 [ 57.375988][ T5318] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 57.380067][ T5318] RIP: 0010:refcount_warn_saturate+0x15a/0x1d0 [ 57.382841][ T5318] Code: e0 1e 5f 8c e8 87 c5 95 fc 90 0f 0b 90 90 eb 99 e8 2b 1e d5 fc c6 05 6d 2c 39 0b 01 90 48 c7 c7 40 1f 5f 8c e8 67 c5 95 fc 90 <0f> 0b 90 90 e9 76 ff ff ff e8 08 1e d5 fc c6 05 47 2c 39 0b 01 90 [ 57.390537][ T5318] RSP: 0018:ffffc9000d4bf8e8 EFLAGS: 00010246 [ 57.392802][ T5318] RAX: 130d00e5e0bf3800 RBX: ffff8880402cdc24 RCX: 0000000000100000 [ 57.396075][ T5318] RDX: ffffc9000e712000 RSI: 00000000000009a9 RDI: 00000000000009aa [ 57.399052][ T5318] RBP: 0000000000000003 R08: ffffffff81601c02 R09: fffffbfff1cfa210 [ 57.401812][ T5318] R10: dffffc0000000000 R11: fffffbfff1cfa210 R12: ffff888000f4f868 [ 57.404601][ T5318] R13: ffff8880402cdc24 R14: 1ffff110001e9f18 R15: ffff888000f4f800 [ 57.407797][ T5318] FS: 00007fbf71ef86c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 [ 57.410927][ T5318] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 57.413643][ T5318] CR2: 0000000020000040 CR3: 000000004034e000 CR4: 0000000000352ef0 [ 57.416979][ T5318] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 57.420009][ T5318] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 57.423017][ T5318] Call Trace: [ 57.424306][ T5318] [ 57.425532][ T5318] ? __warn+0x165/0x4d0 [ 57.427528][ T5318] ? refcount_warn_saturate+0x15a/0x1d0 [ 57.429507][ T5318] ? report_bug+0x2b3/0x500 [ 57.431232][ T5318] ? refcount_warn_saturate+0x15a/0x1d0 [ 57.433299][ T5318] ? handle_bug+0x60/0x90 [ 57.435192][ T5318] ? exc_invalid_op+0x1a/0x50 [ 57.437517][ T5318] ? asm_exc_invalid_op+0x1a/0x20 [ 57.439520][ T5318] ? __warn_printk+0x292/0x360 [ 57.441351][ T5318] ? refcount_warn_saturate+0x15a/0x1d0 [ 57.443309][ T5318] ? refcount_warn_saturate+0x159/0x1d0 [ 57.445361][ T5318] j1939_session_put+0x1ed/0x440 [ 57.447483][ T5318] j1939_sk_sendmsg+0x121b/0x14c0 [ 57.449443][ T5318] ? __pfx_j1939_sk_sendmsg+0x10/0x10 [ 57.451394][ T5318] ? __import_iovec+0x590/0x870 [ 57.453539][ T5318] ? aa_sock_msg_perm+0x91/0x160 [ 57.455730][ T5318] ? __pfx_j1939_sk_sendmsg+0x10/0x10 [ 57.457724][ T5318] __sock_sendmsg+0x221/0x270 [ 57.459590][ T5318] ____sys_sendmsg+0x52a/0x7e0 [ 57.461404][ T5318] ? __pfx_____sys_sendmsg+0x10/0x10 [ 57.463510][ T5318] ? __fget_files+0x2a/0x410 [ 57.465496][ T5318] ? __fget_files+0x2a/0x410 [ 57.467393][ T5318] __sys_sendmsg+0x269/0x350 [ 57.469178][ T5318] ? __pfx___sys_sendmsg+0x10/0x10 [ 57.471132][ T5318] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 57.473501][ T5318] ? do_syscall_64+0x100/0x230 [ 57.475571][ T5318] ? do_syscall_64+0xb6/0x230 [ 57.477484][ T5318] do_syscall_64+0xf3/0x230 [ 57.479219][ T5318] ? clear_bhb_loop+0x35/0x90 [ 57.481054][ T5318] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 57.483120][ T5318] RIP: 0033:0x7fbf7117ff19 [ 57.485118][ T5318] 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 [ 57.492910][ T5318] RSP: 002b:00007fbf71ef8058 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 57.496223][ T5318] RAX: ffffffffffffffda RBX: 00007fbf71345fa0 RCX: 00007fbf7117ff19 [ 57.499370][ T5318] RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000004 [ 57.502499][ T5318] RBP: 00007fbf711f3986 R08: 0000000000000000 R09: 0000000000000000 [ 57.505540][ T5318] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 57.508828][ T5318] R13: 0000000000000000 R14: 00007fbf71345fa0 R15: 00007ffc2cf07a98 [ 57.511981][ T5318] [ 57.513211][ T5318] Kernel panic - not syncing: kernel: panic_on_warn set ... [ 57.516279][ T5318] CPU: 0 UID: 0 PID: 5318 Comm: syz.0.0 Not tainted 6.13.0-rc1-syzkaller-00025-gfeffde684ac2 #0 [ 57.520190][ T5318] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 57.524557][ T5318] Call Trace: [ 57.525711][ T5318] [ 57.526821][ T5318] dump_stack_lvl+0x241/0x360 [ 57.528527][ T5318] ? __pfx_dump_stack_lvl+0x10/0x10 [ 57.530461][ T5318] ? __pfx__printk+0x10/0x10 [ 57.532048][ T5318] ? _printk+0xd5/0x120 [ 57.533625][ T5318] ? __init_begin+0x41000/0x41000 [ 57.535653][ T5318] ? vscnprintf+0x5d/0x90 [ 57.537439][ T5318] panic+0x349/0x880 [ 57.539014][ T5318] ? __warn+0x174/0x4d0 [ 57.540655][ T5318] ? __pfx_panic+0x10/0x10 [ 57.542347][ T5318] __warn+0x344/0x4d0 [ 57.543841][ T5318] ? refcount_warn_saturate+0x15a/0x1d0 [ 57.546039][ T5318] report_bug+0x2b3/0x500 [ 57.547708][ T5318] ? refcount_warn_saturate+0x15a/0x1d0 [ 57.549775][ T5318] handle_bug+0x60/0x90 [ 57.551477][ T5318] exc_invalid_op+0x1a/0x50 [ 57.553442][ T5318] asm_exc_invalid_op+0x1a/0x20 [ 57.555299][ T5318] RIP: 0010:refcount_warn_saturate+0x15a/0x1d0 [ 57.557688][ T5318] Code: e0 1e 5f 8c e8 87 c5 95 fc 90 0f 0b 90 90 eb 99 e8 2b 1e d5 fc c6 05 6d 2c 39 0b 01 90 48 c7 c7 40 1f 5f 8c e8 67 c5 95 fc 90 <0f> 0b 90 90 e9 76 ff ff ff e8 08 1e d5 fc c6 05 47 2c 39 0b 01 90 [ 57.564668][ T5318] RSP: 0018:ffffc9000d4bf8e8 EFLAGS: 00010246 [ 57.566886][ T5318] RAX: 130d00e5e0bf3800 RBX: ffff8880402cdc24 RCX: 0000000000100000 [ 57.570044][ T5318] RDX: ffffc9000e712000 RSI: 00000000000009a9 RDI: 00000000000009aa [ 57.572924][ T5318] RBP: 0000000000000003 R08: ffffffff81601c02 R09: fffffbfff1cfa210 [ 57.576003][ T5318] R10: dffffc0000000000 R11: fffffbfff1cfa210 R12: ffff888000f4f868 [ 57.579055][ T5318] R13: ffff8880402cdc24 R14: 1ffff110001e9f18 R15: ffff888000f4f800 [ 57.582129][ T5318] ? __warn_printk+0x292/0x360 [ 57.583995][ T5318] ? refcount_warn_saturate+0x159/0x1d0 [ 57.585959][ T5318] j1939_session_put+0x1ed/0x440 [ 57.587796][ T5318] j1939_sk_sendmsg+0x121b/0x14c0 [ 57.589289][ T5318] ? __pfx_j1939_sk_sendmsg+0x10/0x10 [ 57.591061][ T5318] ? __import_iovec+0x590/0x870 [ 57.592678][ T5318] ? aa_sock_msg_perm+0x91/0x160 [ 57.594365][ T5318] ? __pfx_j1939_sk_sendmsg+0x10/0x10 [ 57.596192][ T5318] __sock_sendmsg+0x221/0x270 [ 57.598086][ T5318] ____sys_sendmsg+0x52a/0x7e0 [ 57.599865][ T5318] ? __pfx_____sys_sendmsg+0x10/0x10 [ 57.601772][ T5318] ? __fget_files+0x2a/0x410 [ 57.603488][ T5318] ? __fget_files+0x2a/0x410 [ 57.605262][ T5318] __sys_sendmsg+0x269/0x350 [ 57.606930][ T5318] ? __pfx___sys_sendmsg+0x10/0x10 [ 57.608871][ T5318] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 57.611252][ T5318] ? do_syscall_64+0x100/0x230 [ 57.612992][ T5318] ? do_syscall_64+0xb6/0x230 [ 57.614725][ T5318] do_syscall_64+0xf3/0x230 [ 57.616269][ T5318] ? clear_bhb_loop+0x35/0x90 [ 57.617876][ T5318] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 57.619910][ T5318] RIP: 0033:0x7fbf7117ff19 [ 57.621450][ T5318] 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 [ 57.628130][ T5318] RSP: 002b:00007fbf71ef8058 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 57.631397][ T5318] RAX: ffffffffffffffda RBX: 00007fbf71345fa0 RCX: 00007fbf7117ff19 [ 57.634476][ T5318] RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000004 [ 57.637538][ T5318] RBP: 00007fbf711f3986 R08: 0000000000000000 R09: 0000000000000000 [ 57.640568][ T5318] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 57.643605][ T5318] R13: 0000000000000000 R14: 00007fbf71345fa0 R15: 00007ffc2cf07a98 [ 57.646652][ T5318] [ 57.648053][ T5318] Kernel Offset: disabled [ 57.649780][ T5318] Rebooting in 86400 seconds..