WARNING: refcount bug in p9_req_put

9 views
Skip to first unread message

syzbot

unread,
Sep 20, 2019, 1:25:07 PM9/20/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: dbc29aff Linux 4.19.74
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14902ead600000
kernel config: https://syzkaller.appspot.com/x/.config?x=c3b60234a72e3893
dashboard link: https://syzkaller.appspot.com/bug?extid=67dabab020dabb849a31
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+67daba...@syzkaller.appspotmail.com

refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 8339 at lib/refcount.c:187
refcount_sub_and_test_checked lib/refcount.c:187 [inline]
WARNING: CPU: 1 PID: 8339 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: 8339 Comm: syz-executor.2 Not tainted 4.19.74 #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
kobject: 'loop3' (00000000993a32c3): kobject_uevent_env
panic+0x263/0x507 kernel/panic.c:185
__warn.cold+0x20/0x4a kernel/panic.c:540
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
kobject: 'loop3' (00000000993a32c3): fill_kobj_path: path
= '/devices/virtual/block/loop3'
kobject: 'loop4' (00000000a1012e3e): kobject_uevent_env
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 0f 2b 13 06 31 ff 89 de e8 67 a0 46 fe 84 db 75 1a e8 1e 9f 46 fe
48 c7 c7 80 2b 82 87 c6 05 ef 2a 13 06 01 e8 49 2f 1a fe <0f> 0b 45 31 e4
eb 90 e8 ff 9e 46 fe e9 ce fe ff ff 48 89 df e8 52
RSP: 0000:ffff8880579f7848 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000010da4 RSI: ffffffff8155dbd6 RDI: ffffed100af3eefb
RBP: ffff8880579f78d8 R08: ffff888057810140 R09: ffffed1015d25079
R10: ffffed1015d25078 R11: ffff8880ae9283c7 R12: 00000000ffffffff
kobject: 'loop4' (00000000a1012e3e): fill_kobj_path: path
= '/devices/virtual/block/loop4'
R13: 0000000000000000 R14: 1ffff1100af3ef0a R15: ffff8880579f78b0
kobject: 'loop3' (00000000993a32c3): kobject_uevent_env
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:401
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:1083
kobject: 'loop3' (00000000993a32c3): fill_kobj_path: path
= '/devices/virtual/block/loop3'
v9fs_session_init+0x1e7/0x18c0 fs/9p/v9fs.c:421
kobject: 'nullb0' (00000000f014bf3d): kobject_uevent_env
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
kobject: 'nullb0' (00000000f014bf3d): fill_kobj_path: path
= '/devices/virtual/block/nullb0'
RIP: 0033:0x459a09
Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f4372e03c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000459a09
RDX: 0000000020000100 RSI: 0000000020000040 RDI: 0000000000000000
RBP: 000000000075bfc8 R08: 0000000020000540 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4372e046d4
R13: 00000000004c5fa0 R14: 00000000004dac40 R15: 00000000ffffffff
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Feb 28, 2020, 4:29:09 PM2/28/20
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages