------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 3 PID: 13 at lib/refcount.c:28 refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28 Modules linked in: CPU: 3 UID: 0 PID: 13 Comm: kworker/u32:1 Not tainted 6.16.0-rc3-syzkaller-00072-gee88bddf7f2f #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events_unbound toggle_allocation_gate RIP: 0010:refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28 Code: ff 89 de e8 b8 d0 df fc 84 db 0f 85 66 ff ff ff e8 cb d5 df fc c6 05 e0 2d b4 0b 01 90 48 c7 c7 60 27 15 8c e8 f7 95 9e fc 90 <0f> 0b 90 90 e9 43 ff ff ff e8 a8 d5 df fc 0f b6 1d bb 2d b4 0b 31 RSP: 0018:ffffc900006f8d90 EFLAGS: 00010082 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff817ae248 RDX: ffff88801dad8000 RSI: ffffffff817ae255 RDI: 0000000000000001 RBP: ffff888037113ba8 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff888037113ba8 R13: ffff8880553d4000 R14: 0000000000000015 R15: 1ffff1102003c80c FS: 0000000000000000(0000) GS:ffff8880d6a52000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe882380f98 CR3: 000000000e382000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 00000000ffff000c DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: __refcount_sub_and_test include/linux/refcount.h:400 [inline] __refcount_dec_and_test include/linux/refcount.h:432 [inline] refcount_dec_and_test include/linux/refcount.h:450 [inline] p9_req_put+0x1ec/0x250 net/9p/client.c:404 req_done+0x1dc/0x2e0 net/9p/trans_virtio.c:147 vring_interrupt drivers/virtio/virtio_ring.c:2715 [inline] vring_interrupt+0x31e/0x400 drivers/virtio/virtio_ring.c:2690 __handle_irq_event_percpu+0x229/0x7d0 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x28e/0xab0 kernel/irq/chip.c:797 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq arch/x86/kernel/irq.c:254 [inline] call_irq_handler arch/x86/kernel/irq.c:266 [inline] __common_interrupt+0xdf/0x250 arch/x86/kernel/irq.c:292 common_interrupt+0xba/0xe0 arch/x86/kernel/irq.c:285 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:27 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:183 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x10/0x70 kernel/kcov.c:217 Code: 00 00 5b e9 12 29 20 03 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 34 24 65 48 8b 15 98 bf 10 12 <65> 8b 05 a9 bf 10 12 a9 00 01 ff 00 74 1d f6 c4 01 74 43 a9 00 00 RSP: 0018:ffffc90000107898 EFLAGS: 00000202 RAX: 0000000000000000 RBX: ffff88806a6420a0 RCX: ffffffff81b001cd RDX: ffff88801dad8000 RSI: ffffffff81b001a9 RDI: 0000000000000005 RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: dffffc0000000000 R13: 0000000000000003 R14: ffffed100d4c8415 R15: ffff88806a73b580 native_pause arch/x86/include/asm/vdso/processor.h:13 [inline] cpu_relax arch/x86/include/asm/vdso/processor.h:18 [inline] csd_lock_wait kernel/smp.c:340 [inline] smp_call_function_many_cond+0xd79/0x1510 kernel/smp.c:885 on_each_cpu_cond_mask+0x40/0x90 kernel/smp.c:1052 on_each_cpu include/linux/smp.h:71 [inline] smp_text_poke_sync_each_cpu arch/x86/kernel/alternative.c:2691 [inline] smp_text_poke_batch_finish+0x7b5/0xdb0 arch/x86/kernel/alternative.c:2984 arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146 jump_label_update+0x376/0x550 kernel/jump_label.c:919 static_key_enable_cpuslocked+0x1b7/0x270 kernel/jump_label.c:210 static_key_enable+0x1a/0x20 kernel/jump_label.c:223 toggle_allocation_gate mm/kfence/core.c:850 [inline] toggle_allocation_gate+0xfa/0x280 mm/kfence/core.c:842 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: 5b pop %rbx 3: e9 12 29 20 03 jmp 0x320291a 8: 66 90 xchg %ax,%ax a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: f3 0f 1e fa endbr64 1e: 48 8b 34 24 mov (%rsp),%rsi 22: 65 48 8b 15 98 bf 10 mov %gs:0x1210bf98(%rip),%rdx # 0x1210bfc2 29: 12 * 2a: 65 8b 05 a9 bf 10 12 mov %gs:0x1210bfa9(%rip),%eax # 0x1210bfda <-- trapping instruction 31: a9 00 01 ff 00 test $0xff0100,%eax 36: 74 1d je 0x55 38: f6 c4 01 test $0x1,%ah 3b: 74 43 je 0x80 3d: a9 .byte 0xa9