Hello,
syzbot found the following crash on:
HEAD commit: 58b454eb Linux 4.14.112
git tree: linux-4.14.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=16d24447200000
kernel config:
https://syzkaller.appspot.com/x/.config?x=8b0e7ab7678533ab
dashboard link:
https://syzkaller.appspot.com/bug?extid=cf09ac84eeb8ec9efd46
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+cf09ac...@syzkaller.appspotmail.com
RBP: 000000000073bf00 R08: 0000000020000600 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6ef67e66d4
R13: 00000000004c4c14 R14: 00000000004d88a0 R15: 0000000000000004
9pnet: Found fid 0 not clunked
==================================================================
BUG: KASAN: use-after-free in p9_client_clunk+0x131/0x150
net/9p/client.c:1505
Read of size 8 at addr ffff88808c472d00 by task syz-executor.4/13558
CPU: 1 PID: 13558 Comm: syz-executor.4 Not tainted 4.14.112 #2
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x19c lib/dump_stack.c:53
print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252
kasan_report_error mm/kasan/report.c:351 [inline]
kasan_report mm/kasan/report.c:409 [inline]
kasan_report.cold+0xaf/0x2b5 mm/kasan/report.c:393
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430
p9_client_clunk+0x131/0x150 net/9p/client.c:1505
v9fs_mount+0x6b9/0x870 fs/9p/vfs_super.c:200
mount_fs+0x9d/0x2a7 fs/super.c:1237
vfs_kern_mount.part.0+0x5e/0x3d0 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2549 [inline]
do_mount+0x417/0x27d0 fs/namespace.c:2879
SYSC_mount fs/namespace.c:3095 [inline]
SyS_mount+0xab/0x120 fs/namespace.c:3072
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x458c29
RSP: 002b:00007f6ef67e5c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f6ef67e5c90 RCX: 0000000000458c29
RDX: 00000000200005c0 RSI: 0000000020000580 RDI: 0000000000000000
RBP: 000000000073bf00 R08: 0000000020000600 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6ef67e66d4
R13: 00000000004c4c14 R14: 00000000004d88a0 R15: 0000000000000004
Allocated by task 13558:
save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
save_stack+0x45/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc mm/kasan/kasan.c:551 [inline]
kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529
kmem_cache_alloc_trace+0x152/0x790 mm/slab.c:3618
kmalloc include/linux/slab.h:488 [inline]
p9_fid_create+0x4e/0x3b0 net/9p/client.c:918
p9_client_attach+0x7f/0x6a0 net/9p/client.c:1158
v9fs_session_init+0xbe8/0x1590 fs/9p/v9fs.c:450
v9fs_mount+0x7d/0x870 fs/9p/vfs_super.c:135
mount_fs+0x9d/0x2a7 fs/super.c:1237
vfs_kern_mount.part.0+0x5e/0x3d0 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2549 [inline]
do_mount+0x417/0x27d0 fs/namespace.c:2879
SYSC_mount fs/namespace.c:3095 [inline]
SyS_mount+0xab/0x120 fs/namespace.c:3072
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Freed by task 13558:
save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
save_stack+0x45/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524
__cache_free mm/slab.c:3496 [inline]
kfree+0xcc/0x270 mm/slab.c:3815
p9_fid_destroy+0x1cd/0x280 net/9p/client.c:957
p9_client_destroy.cold+0x61/0xac net/9p/client.c:1121
v9fs_session_close+0x4a/0x2c0 fs/9p/v9fs.c:490
v9fs_kill_super+0x4e/0xa0 fs/9p/vfs_super.c:233
deactivate_locked_super+0x79/0xe0 fs/super.c:319
sget_userns+0x9df/0xc30 fs/super.c:537
sget+0xd6/0x120 fs/super.c:572
v9fs_mount+0xa8/0x870 fs/9p/vfs_super.c:141
mount_fs+0x9d/0x2a7 fs/super.c:1237
vfs_kern_mount.part.0+0x5e/0x3d0 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2549 [inline]
do_mount+0x417/0x27d0 fs/namespace.c:2879
SYSC_mount fs/namespace.c:3095 [inline]
SyS_mount+0xab/0x120 fs/namespace.c:3072
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
The buggy address belongs to the object at ffff88808c472d00
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 0 bytes inside of
96-byte region [ffff88808c472d00, ffff88808c472d60)
The buggy address belongs to the page:
page:ffffea0002311c80 count:1 mapcount:0 mapping:ffff88808c472000 index:0x0
flags: 0x1fffc0000000100(slab)
raw: 01fffc0000000100 ffff88808c472000 0000000000000000 0000000100000020
raw: ffffea00025b0d20 ffffea00025b77a0 ffff8880aa8004c0 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88808c472c00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff88808c472c80: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
> ffff88808c472d00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff88808c472d80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff88808c472e00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
==================================================================
---
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.