syzbot


WARNING: refcount bug in p9_req_put

Status: auto-closed as invalid on 2020/02/28 21:29
Reported-by: syzbot+67dabab020dabb849a31@syzkaller.appspotmail.com
First crash: 1709d, last: 1668d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in p9_req_put (3) v9fs 8 4d20h 120d 0/26 upstream: reported on 2024/01/26 09:05
upstream WARNING: refcount bug in p9_req_put v9fs syz inconclusive done 6 1465d 2018d 15/26 fixed on 2020/11/16 12:12
upstream WARNING: refcount bug in p9_req_put (2) v9fs 9 268d 614d 0/26 auto-obsoleted due to no activity on 2023/12/09 05:29

Sample crash report:
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 4239 at lib/refcount.c:187 refcount_sub_and_test_checked lib/refcount.c:187 [inline]
WARNING: CPU: 1 PID: 4239 at lib/refcount.c:187 refcount_sub_and_test_checked+0x1c5/0x1f0 lib/refcount.c:177
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 4239 Comm: syz-executor.1 Not tainted 4.19.81 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x172/0x1f0 lib/dump_stack.c:113
 panic+0x26a/0x50e kernel/panic.c:186
 __warn.cold+0x20/0x53 kernel/panic.c:541
 report_bug+0x263/0x2b0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 fixup_bug arch/x86/kernel/traps.c:173 [inline]
 do_error_trap+0x204/0x360 arch/x86/kernel/traps.c:296
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1037
RIP: 0010:refcount_sub_and_test_checked lib/refcount.c:187 [inline]
RIP: 0010:refcount_sub_and_test_checked+0x1c5/0x1f0 lib/refcount.c:177
Code: 1d 07 97 14 06 31 ff 89 de e8 87 d8 47 fe 84 db 75 1a e8 3e d7 47 fe 48 c7 c7 40 1f 82 87 c6 05 e7 96 14 06 01 e8 09 4d 1b fe <0f> 0b 45 31 e4 eb 90 e8 1f d7 47 fe e9 ce fe ff ff 48 89 df e8 c2
RSP: 0018:ffff88805ab27848 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000111b2 RSI: ffffffff81553f06 RDI: ffffed100b564efb
RBP: ffff88805ab278d8 R08: ffff888078ec4300 R09: ffffed1015d25079
R10: ffffed1015d25078 R11: ffff8880ae9283c7 R12: 00000000ffffffff
R13: 0000000000000000 R14: 1ffff1100b564f0a R15: ffff88805ab278b0
 refcount_dec_and_test_checked+0x1b/0x20 lib/refcount.c:212
 kref_put include/linux/kref.h:69 [inline]
 p9_req_put+0x20/0x60 net/9p/client.c:402
 p9_conn_destroy net/9p/trans_fd.c:880 [inline]
 p9_fd_close+0x2ee/0x570 net/9p/trans_fd.c:913
 p9_client_create+0x98c/0x1400 net/9p/client.c:1084
 v9fs_session_init+0x1e7/0x18c0 fs/9p/v9fs.c:421
 v9fs_mount+0x7d/0x920 fs/9p/vfs_super.c:135
 mount_fs+0xa8/0x31f fs/super.c:1261
 vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:961
 vfs_kern_mount fs/namespace.c:951 [inline]
 do_new_mount fs/namespace.c:2469 [inline]
 do_mount+0x53e/0x2bc0 fs/namespace.c:2799
 ksys_mount+0xdb/0x150 fs/namespace.c:3015
 __do_sys_mount fs/namespace.c:3029 [inline]
 __se_sys_mount fs/namespace.c:3026 [inline]
 __x64_sys_mount+0xbe/0x150 fs/namespace.c:3026
 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459f49
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f796fff7c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000459f49
RDX: 0000000020000140 RSI: 0000000020000000 RDI: 0000000000000000
RBP: 000000000075c118 R08: 00000000200004c0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f796fff86d4
R13: 00000000004c692a R14: 00000000004dbe30 R15: 00000000ffffffff
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/31 21:28 linux-4.19.y ef244c308885 a41ca8fa .config console log report ci2-linux-4-19
2019/09/20 16:24 linux-4.19.y dbc29aff8d04 d96e88f3 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.