WARNING: refcount bug in p9_req_put (4)

Status: upstream: reported C repro on 2026/06/06 11:35
Subsystems: v9fs
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+f6fdb3bdd2c1d419e263@syzkaller.appspotmail.com
First crash: 149d, last: 68d
▶ ▼ ✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
d75f19c7 assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ✅ ❓ WARNING: refcount bug in p9_req_put (4) 2026/06/09 17:55 2026/06/09 17:55 2026/06/09 18:40 c36c07f6
▶ ▼ Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [v9fs?] WARNING: refcount bug in p9_req_put (4) 2 (5) 2026/06/06 22:08
▶ ▼ Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 WARNING: refcount bug in p9_req_put 13 2 2555d 2596d 0/1 auto-closed as invalid on 2020/02/28 21:29
upstream WARNING: refcount bug in p9_req_put (3) v9fs 13 syz, C 99 268d 1007d 0/29 auto-obsoleted due to no activity on 2026/05/15 00:21
upstream WARNING: refcount bug in p9_req_put v9fs 13 syz inconclusive done 6 2352d 2905d 15/29 fixed on 2020/11/16 12:12
upstream WARNING: refcount bug in p9_req_put (2) v9fs 13 9 1156d 1502d 0/29 auto-obsoleted due to no activity on 2023/12/09 05:29
▶ ▼ Last patch testing requests (4)
Created Duration User Patch Repo Result
2026/10/12 20:22 21m retest repro upstream no crash job log log
2026/08/03 19:41 27m retest repro upstream report log
2026/06/06 21:41 25m hdanton@sina.com patch upstream OK log
2026/06/06 13:11 20m hdanton@sina.com patch upstream report log

Sample crash report:
------------[ 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:
 <IRQ>
 __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
 </IRQ>
 <TASK>
 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 <e8> 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
 </TASK>
----------------
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

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/13 16:58 upstream a13c140cc289 a870962e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/07/13 16:34 upstream a13c140cc289 a870962e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/07/12 22:29 upstream f4fb100039e9 d78ea535 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/07/01 00:26 upstream dc59e4fea9d8 00a5cf1c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/06/10 13:31 upstream acb7500801e9 f79bac11 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/06/05 15:41 upstream ddd664bbff63 48b6c3fa .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/06/04 19:33 upstream ba3e43a9e601 197909be .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/06/04 13:42 upstream ba3e43a9e601 197909be .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/06/04 13:09 upstream ba3e43a9e601 197909be .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/06/04 09:47 upstream ba3e43a9e601 197909be .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/06/02 11:30 upstream 6f3ed7fec72f 62fe1528 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2026/08/22 18:45 upstream 66fb95a52111 1e72964b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2026/08/17 19:55 upstream 8d3ae59288f1 905244d6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2026/07/20 19:39 upstream 1590cf032971 4763fed7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2026/06/17 09:17 upstream 6b5a2b7d9bc1 62cc6db3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
* Struck through repros no longer work on HEAD.