syzbot


WARNING: refcount bug in p9_req_put (3)

Status: upstream: reported C repro on 2024/01/26 09:05
Subsystems: v9fs
[Documentation on labels]
Reported-by: syzbot+d99d2414db66171fccbb@syzkaller.appspotmail.com
First crash: 578d, last: 10d
Discussions (9)
Title Replies (including bot) Last reply
[syzbot] Monthly v9fs report (Jul 2025) 0 (1) 2025/07/16 13:32
[syzbot] Monthly v9fs report (Jun 2025) 0 (1) 2025/06/16 09:59
[syzbot] Monthly v9fs report (May 2025) 0 (1) 2025/05/15 07:46
[syzbot] Monthly v9fs report (Apr 2025) 0 (1) 2025/04/14 10:17
[syzbot] Monthly v9fs report (Mar 2025) 0 (1) 2025/03/04 15:15
[syzbot] Monthly v9fs report (Jan 2025) 0 (1) 2025/01/02 13:21
[syzbot] Monthly v9fs report (Aug 2024) 0 (1) 2024/08/29 13:20
[syzbot] [net?] [v9fs?] WARNING: refcount bug in p9_req_put (3) 2 (4) 2024/07/22 06:14
[syzbot] Monthly v9fs report (Apr 2024) 0 (1) 2024/04/30 07:12
Similar bugs (3)
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 2121d 2162d 0/1 auto-closed as invalid on 2020/02/28 21:29
upstream WARNING: refcount bug in p9_req_put v9fs 13 syz inconclusive done 6 1918d 2471d 15/29 fixed on 2020/11/16 12:12
upstream WARNING: refcount bug in p9_req_put (2) v9fs 13 9 722d 1068d 0/29 auto-obsoleted due to no activity on 2023/12/09 05:29
Last patch testing requests (6)
Created Duration User Patch Repo Result
2025/06/05 14:36 18m retest repro upstream OK log
2025/06/05 14:36 18m retest repro upstream OK log
2025/06/05 14:36 18m retest repro upstream OK log
2025/01/24 14:02 11m retest repro upstream error
2024/11/24 01:46 29m retest repro upstream OK log
2024/09/23 13:53 19m retest repro upstream OK log

Sample crash report:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 3 PID: 7138 at lib/refcount.c:28 refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28
Modules linked in:
CPU: 3 UID: 0 PID: 7138 Comm: syz.1.329 Not tainted 6.16.0-rc2-syzkaller-00045-g4663747812d1 #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
RIP: 0010:refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28
Code: ff 89 de e8 28 f8 df fc 84 db 0f 85 66 ff ff ff e8 3b fd df fc c6 05 30 5c b4 0b 01 90 48 c7 c7 a0 25 15 8c e8 e7 c1 9e fc 90 <0f> 0b 90 90 e9 43 ff ff ff e8 18 fd df fc 0f b6 1d 0b 5c b4 0b 31
RSP: 0018:ffffc900006f8d90 EFLAGS: 00010082
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff817ae248
RDX: ffff888029d68000 RSI: ffffffff817ae255 RDI: 0000000000000001
RBP: ffff88802b5adcb8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: ffff88802b5adcb8
R13: ffff888031046800 R14: 0000000000000015 R15: 1ffff11020a7100c
FS:  0000555569bfe500(0000) GS:ffff8880d6a53000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f47e20a3d58 CR3: 000000002cb2f000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
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: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:789
 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
 </IRQ>
 <TASK>
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:194
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 76 c0 15 f6 48 89 df e8 5e 14 16 f6 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 <bf> 01 00 00 00 e8 95 34 06 f6 65 8b 05 8e 1a 4a 08 85 c0 74 16 5b
RSP: 0018:ffffc900073a7b88 EFLAGS: 00000246
RAX: 0000000000000006 RBX: ffff8880517c0a10 RCX: ffffffff81c3eb9f
RDX: 0000000000000000 RSI: ffffffff8de19da0 RDI: ffffffff8c1579e0
RBP: 0000000000000206 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff90a81557 R11: 0000000000000000 R12: ffff8880517c0a10
R13: ffffffff93ce8c80 R14: ffff8880517c0000 R15: ffffc900073a7be0
 class_raw_spinlock_irqsave_destructor include/linux/spinlock.h:557 [inline]
 try_to_wake_up+0xa25/0x1680 kernel/sched/core.c:4226
 wake_up_process kernel/sched/core.c:4475 [inline]
 wake_up_q+0xa3/0x160 kernel/sched/core.c:1081
 futex_wake+0x460/0x530 kernel/futex/waitwake.c:198
 do_futex+0x1e3/0x350 kernel/futex/syscalls.c:107
 __do_sys_futex kernel/futex/syscalls.c:179 [inline]
 __se_sys_futex kernel/futex/syscalls.c:160 [inline]
 __x64_sys_futex+0x1e0/0x4c0 kernel/futex/syscalls.c:160
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f47e118e929
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:00007ffc285c81e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007f47e13b6088 RCX: 00007f47e118e929
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f47e13b6088
RBP: 0000000000000001 R08: 000000000000000d R09: 00000010285c84df
R10: 00007f47e13b5fa0 R11: 0000000000000246 R12: 00007f47e13b608c
R13: 00007f47e13b6080 R14: 0000000000001053 R15: 0000000000000005
 </TASK>
----------------
Code disassembly (best guess):
   0:	f5                   	cmc
   1:	53                   	push   %rbx
   2:	48 8b 74 24 10       	mov    0x10(%rsp),%rsi
   7:	48 89 fb             	mov    %rdi,%rbx
   a:	48 83 c7 18          	add    $0x18,%rdi
   e:	e8 76 c0 15 f6       	call   0xf615c089
  13:	48 89 df             	mov    %rbx,%rdi
  16:	e8 5e 14 16 f6       	call   0xf6161479
  1b:	f7 c5 00 02 00 00    	test   $0x200,%ebp
  21:	75 23                	jne    0x46
  23:	9c                   	pushf
  24:	58                   	pop    %rax
  25:	f6 c4 02             	test   $0x2,%ah
  28:	75 37                	jne    0x61
* 2a:	bf 01 00 00 00       	mov    $0x1,%edi <-- trapping instruction
  2f:	e8 95 34 06 f6       	call   0xf60634c9
  34:	65 8b 05 8e 1a 4a 08 	mov    %gs:0x84a1a8e(%rip),%eax        # 0x84a1ac9
  3b:	85 c0                	test   %eax,%eax
  3d:	74 16                	je     0x55
  3f:	5b                   	pop    %rbx

Crashes (85):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/18 06:41 upstream 4663747812d1 74c9d252 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/06/16 18:13 upstream e04c78d86a96 d1716036 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/07/29 11:23 upstream ced1b9e0392d c4a95487 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/07/22 13:25 upstream 89be9a83ccf1 8e9d1dc1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/07/12 09:55 upstream 379f604cc3dc 3cda49cf .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/07/09 14:52 upstream 733923397fd9 956bd956 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/07/09 05:09 upstream 733923397fd9 f4e5e155 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/07/08 16:21 upstream d7b8f8e20813 4d9fdfa4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/06/26 21:52 upstream ee88bddf7f2f 1ae8177e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/06/19 01:19 upstream 74b4cc9b8780 ed3e87f7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/06/18 05:31 upstream 4663747812d1 74c9d252 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/06/16 17:28 upstream e04c78d86a96 d1716036 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/06/15 14:23 upstream 8c6bc74c7f89 5f4b362d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/06/12 15:29 upstream 2c4a1f3fe03e 98683f8f .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/06/11 12:54 upstream aef17cb3d3c4 5d7e17ca .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/06/06 09:02 upstream e271ed52b344 3d899f2c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/05/22 14:04 upstream d608703fcdd9 0919b50b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/05/22 14:03 upstream d608703fcdd9 0919b50b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/05/12 16:50 upstream 82f2b0b97b36 f6671af7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/05/10 07:32 upstream 0e1329d4045c 77908e5f .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/04/21 04:47 upstream 6fea5fabd332 2a20f901 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/04/11 18:22 upstream 900241a5cc15 12ba9c21 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/04/11 17:06 upstream 900241a5cc15 12ba9c21 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/04/05 10:03 upstream 9f867ba24d36 c53ea9c9 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/03/21 15:04 upstream b3ee1e460951 62330552 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/03/21 14:26 upstream b3ee1e460951 62330552 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/03/07 05:51 upstream f315296c92fd 831e3629 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/02/24 13:44 upstream d082ecbc71e9 d34966d1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/02/21 05:22 upstream e9a8cac0bf89 0808a665 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/02/19 12:47 upstream 6537cfb395f3 cbd8edab .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/02/18 15:50 upstream 2408a807bfc3 c37c7249 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/02/17 13:42 upstream 0ad2507d5d93 9be4ace3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/02/17 03:14 upstream ba643b6d8440 40a34ec9 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/02/10 12:24 upstream a64dcfb451e2 43f51a00 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/01/10 13:55 upstream 2144da25584e 67d7ec0a .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/01/06 17:25 upstream 5428dc1906dd f3558dbf .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2024/12/20 16:15 upstream 8faabc041a00 49cfeac8 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2024/11/10 01:22 upstream da4373fbcf00 6b856513 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2024/07/22 06:13 upstream 7846b618e0a4 b88348e9 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2024/03/02 16:41 upstream 5ad3cb0ed525 25905f5d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in p9_req_put
2025/08/11 12:21 upstream 8f5ae30d69d7 32a0e5ed .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/07/20 00:39 upstream 4871b7cb27f4 7117feec .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/05/16 23:18 upstream 3c21441eeffc f41472b0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/05/14 22:05 upstream 9f35e33144ae a4fa04ef .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/05/05 15:55 upstream 92a09c47464d 6ca47dd8 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/05/03 09:23 upstream 00b827f0cffa b0714e37 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/05/03 06:59 upstream 00b827f0cffa b0714e37 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/03/24 08:23 upstream 586de92313fc 875573af .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/03/11 11:26 upstream 4d872d51bc9d 16256247 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/02/26 01:19 upstream 2a1944bff549 d34966d1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/02/18 10:10 upstream 2408a807bfc3 c37c7249 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/02/05 05:23 upstream 5c8c229261f1 5896748e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/02/05 05:19 upstream 5c8c229261f1 5896748e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2025/02/05 05:19 upstream 5c8c229261f1 5896748e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2024/01/27 14:27 upstream 3a5879d495b2 cc4a4020 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in p9_req_put
2024/01/21 21:11 upstream 4fbbed787267 9bd8dcda .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.