------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28, CPU#3: syz.7.6152/29749 Modules linked in: CPU: 3 UID: 0 PID: 29749 Comm: syz.7.6152 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28 Code: 06 e8 10 a5 ec fc 48 8d 3d 09 08 10 0c 67 48 0f b9 3a e8 ff a4 ec fc 5b 5d c3 cc cc cc cc e8 f3 a4 ec fc 48 8d 3d fc 07 10 0c <67> 48 0f b9 3a e8 e2 a4 ec fc 5b 5d e9 9b 49 9f 06 e8 d6 a4 ec fc RSP: 0000:ffffc900006f8d98 EFLAGS: 00010046 RAX: 0000000080010002 RBX: ffff88803d049768 RCX: ffffffff851d371b RDX: ffff888028152540 RSI: ffffffff851d37ad RDI: ffffffff912d3fb0 RBP: 0000000000000003 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: 0000000000000000 R12: ffff88803d049768 R13: ffff888000124400 R14: 000000000000000b R15: 1ffff1100689880c FS: 00007fa14e00d6c0(0000) GS:ffff8880d60e8000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00001ffffffff700 CR3: 000000005b8b7000 CR4: 0000000000352ef0 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:281 req_done+0x1dc/0x2e0 net/9p/trans_virtio.c:147 vring_interrupt+0x2ef/0x660 drivers/virtio/virtio_ring.c:3297 __handle_irq_event_percpu+0x232/0x880 kernel/irq/handle.c:209 handle_irq_event_percpu kernel/irq/handle.c:246 [inline] handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:263 handle_edge_irq+0x34c/0x950 kernel/irq/chip.c:859 generic_handle_irq_desc include/linux/irqdesc.h:188 [inline] handle_irq arch/x86/kernel/irq.c:209 [inline] call_irq_handler arch/x86/kernel/irq.c:265 [inline] __common_interrupt+0xd8/0x2f0 arch/x86/kernel/irq.c:280 common_interrupt+0xb9/0xe0 arch/x86/kernel/irq.c:273 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:665 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:188 [inline] RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:206 Code: 90 f3 0f 1e fa 53 48 8b 74 24 08 48 89 fb 48 83 c7 18 e8 ba 40 29 f6 48 89 df e8 42 90 29 f6 e8 2d f4 55 f6 fb bf 01 00 00 00 12 a0 18 f6 65 8b 05 5b 49 a7 08 85 c0 74 06 5b e9 81 4a 00 00 RSP: 0000:ffffc90007796a90 EFLAGS: 00000206 RAX: 0000000000014095 RBX: ffff88803bb75de0 RCX: 0000000000000040 RDX: 0000000000000000 RSI: ffffffff8e1a3c59 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001e00 R13: ffffc90007796b08 R14: 0000000000000000 R15: 0000000000000000 spin_unlock_irq include/linux/spinlock.h:402 [inline] shmem_add_to_page_cache+0x874/0xcd0 mm/shmem.c:928 shmem_alloc_and_add_folio+0x558/0xd40 mm/shmem.c:1975 shmem_get_folio_gfp+0x6ad/0x1910 mm/shmem.c:2502 shmem_get_folio mm/shmem.c:2608 [inline] shmem_write_begin+0x1a4/0x420 mm/shmem.c:3239 generic_perform_write+0x292/0xa40 mm/filemap.c:4358 shmem_file_write_iter+0x10e/0x140 mm/shmem.c:3414 __kernel_write_iter+0x2ac/0x930 fs/read_write.c:621 dump_emit_page fs/coredump.c:1298 [inline] dump_user_range+0x3f9/0xad0 fs/coredump.c:1372 elf_core_dump+0x2d68/0x3d20 fs/binfmt_elf.c:2109 coredump_write fs/coredump.c:1052 [inline] do_coredump fs/coredump.c:1131 [inline] vfs_coredump+0x294b/0x56f0 fs/coredump.c:1200 get_signal+0x1f2a/0x21e0 kernel/signal.c:3031 arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop kernel/entry/common.c:101 [inline] __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:244 [inline] irqentry_exit_to_user_mode include/linux/irq-entry-common.h:315 [inline] irqentry_exit+0x402/0xa00 kernel/entry/common.c:165 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 RIP: 0033:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 002b:0000200000000008 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007fa14d425fa0 RCX: 00007fa14d19de59 RDX: 0000000000000000 RSI: 0000200000000000 RDI: 000000000400a200 RBP: 00007fa14d233e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fa14d426038 R14: 00007fa14d425fa0 R15: 00007ffe3e8b0fb8 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: e8 10 a5 ec fc call 0xfceca515 5: 48 8d 3d 09 08 10 0c lea 0xc100809(%rip),%rdi # 0xc100815 c: 67 48 0f b9 3a ud1 (%edx),%rdi 11: e8 ff a4 ec fc call 0xfceca515 16: 5b pop %rbx 17: 5d pop %rbp 18: c3 ret 19: cc int3 1a: cc int3 1b: cc int3 1c: cc int3 1d: e8 f3 a4 ec fc call 0xfceca515 22: 48 8d 3d fc 07 10 0c lea 0xc1007fc(%rip),%rdi # 0xc100825 * 29: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2e: e8 e2 a4 ec fc call 0xfceca515 33: 5b pop %rbx 34: 5d pop %rbp 35: e9 9b 49 9f 06 jmp 0x69f49d5 3a: e8 d6 a4 ec fc call 0xfceca515