syzbot


WARNING: refcount bug in p9_req_put (4)

Status: upstream: reported C repro on 2026/06/06 11:35
Subsystems: v9fs
[Documentation on labels]
Reported-by: syzbot+f6fdb3bdd2c1d419e263@syzkaller.appspotmail.com
First crash: 6d23h, last: 3d19h
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 2412d 2453d 0/1 auto-closed as invalid on 2020/02/28 21:29
upstream WARNING: refcount bug in p9_req_put (3) v9fs 13 C 99 125d 865d 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 2210d 2762d 15/29 fixed on 2020/11/16 12:12
upstream WARNING: refcount bug in p9_req_put (2) v9fs 13 9 1013d 1359d 0/29 auto-obsoleted due to no activity on 2023/12/09 05:29
Last patch testing requests (2)
Created Duration User Patch Repo Result
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:
9pnet: Tag 0 still in use
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: lib/refcount.c:28 at refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28, CPU#2: syz-executor/5869
Modules linked in:
CPU: 2 UID: 0 PID: 5869 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full) 
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: cc e8 b0 53 0f fd 48 8d 3d 89 44 e8 0b 67 48 0f b9 3a e8 9f 53 0f fd 5b 5d e9 d8 4f 93 06 e8 93 53 0f fd 48 8d 3d 7c 44 e8 0b <67> 48 0f b9 3a e8 82 53 0f fd 5b 5d c3 cc cc cc cc e8 76 53 0f fd
RSP: 0018:ffffc900060a7c38 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88803ecb7218 RCX: ffffffff84f95c3b
RDX: ffff88802b710000 RSI: ffffffff84f95ccd RDI: ffffffff90e1a150
RBP: 0000000000000003 R08: 0000000000000005 R09: 0000000000000004
R10: 0000000000000003 R11: 0000000000000000 R12: ffff88803ecb7218
R13: ffff888035c59800 R14: ffffc900060a7cc8 R15: ffff88801fa88040
FS:  000055557717e500(0000) GS:ffff8880d6583000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e3b8556be0 CR3: 0000000037a35000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 __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
 p9_tag_cleanup net/9p/client.c:308 [inline]
 p9_client_destroy.cold+0x20/0xe9 net/9p/client.c:963
 v9fs_session_close+0x49/0x2d0 fs/9p/v9fs.c:543
 v9fs_kill_super+0x4d/0xa0 fs/9p/vfs_super.c:175
 deactivate_locked_super+0xc1/0x1b0 fs/super.c:476
 deactivate_super fs/super.c:509 [inline]
 deactivate_super+0xe7/0x110 fs/super.c:505
 cleanup_mnt+0x21f/0x450 fs/namespace.c:1312
 task_work_run+0x150/0x240 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
 exit_to_user_mode_loop+0x157/0x670 kernel/entry/common.c:98
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
 do_syscall_64+0x666/0x870 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbad779e097
Code: a2 c7 05 5c 06 25 00 00 00 00 00 eb 96 e8 e1 12 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007fffe847bc88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007fbad78321ca RCX: 00007fbad779e097
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007fffe847bd40
RBP: 00007fffe847bd40 R08: 00007fffe847cd40 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fffe847cdd0
R13: 00007fbad78321ca R14: 000000000004828a R15: 00007fffe847ce10
 </TASK>
----------------
Code disassembly (best guess):
   0:	cc                   	int3
   1:	e8 b0 53 0f fd       	call   0xfd0f53b6
   6:	48 8d 3d 89 44 e8 0b 	lea    0xbe84489(%rip),%rdi        # 0xbe84496
   d:	67 48 0f b9 3a       	ud1    (%edx),%rdi
  12:	e8 9f 53 0f fd       	call   0xfd0f53b6
  17:	5b                   	pop    %rbx
  18:	5d                   	pop    %rbp
  19:	e9 d8 4f 93 06       	jmp    0x6934ff6
  1e:	e8 93 53 0f fd       	call   0xfd0f53b6
  23:	48 8d 3d 7c 44 e8 0b 	lea    0xbe8447c(%rip),%rdi        # 0xbe844a6
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	e8 82 53 0f fd       	call   0xfd0f53b6
  34:	5b                   	pop    %rbx
  35:	5d                   	pop    %rbp
  36:	c3                   	ret
  37:	cc                   	int3
  38:	cc                   	int3
  39:	cc                   	int3
  3a:	cc                   	int3
  3b:	e8 76 53 0f fd       	call   0xfd0f53b6

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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/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: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
* Struck through repros no longer work on HEAD.