================================================================== BUG: KASAN: use-after-free in debugfs_remove+0x10d/0x130 fs/debugfs/inode.c:690 Read of size 8 at addr ffff888085757e00 by task syz-executor.4/24031 CPU: 1 PID: 24031 Comm: syz-executor.4 Not tainted 5.1.0-rc6+ #87 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 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 debugfs_remove+0x10d/0x130 fs/debugfs/inode.c:690 blk_trace_free+0x62/0x140 kernel/trace/blktrace.c:313 blk_trace_cleanup kernel/trace/blktrace.c:339 [inline] __blk_trace_remove+0x78/0xa0 kernel/trace/blktrace.c:352 blk_trace_ioctl+0x239/0x300 kernel/trace/blktrace.c:731 blkdev_ioctl+0x276/0x1d10 block/ioctl.c:591 block_ioctl+0xee/0x130 fs/block_dev.c:1933 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458da9 Code: ad b8 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 b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ff04e240c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458da9 RDX: 0000000020000080 RSI: 0000000000001276 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff04e2416d4 R13: 00000000004c0285 R14: 00000000004d2678 R15: 00000000ffffffff Allocated by task 18032: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:505 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc mm/slab.c:3393 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3555 __d_alloc+0x2e/0x8c0 fs/dcache.c:1622 d_alloc+0x4d/0x2b0 fs/dcache.c:1701 __lookup_hash+0xcd/0x190 fs/namei.c:1540 filename_create+0x1a7/0x4f0 fs/namei.c:3635 user_path_create fs/namei.c:3692 [inline] do_symlinkat+0xf3/0x290 fs/namei.c:4145 __do_sys_symlink fs/namei.c:4171 [inline] __se_sys_symlink fs/namei.c:4169 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4169 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 18149: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467 __cache_free mm/slab.c:3499 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3765 __d_free+0x20/0x30 fs/dcache.c:269 __rcu_reclaim kernel/rcu/rcu.h:227 [inline] rcu_do_batch kernel/rcu/tree.c:2475 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2788 [inline] rcu_core+0x916/0x13a0 kernel/rcu/tree.c:2769 __do_softirq+0x266/0x95a kernel/softirq.c:293 The buggy address belongs to the object at ffff888085757dc0 which belongs to the cache dentry(97:syz5) of size 288 The buggy address is located 64 bytes inside of 288-byte region [ffff888085757dc0, ffff888085757ee0) The buggy address belongs to the page: page:ffffea000215d5c0 count:1 mapcount:0 mapping:ffff8880a3f8e4c0 index:0xffff888085757840 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000263b148 ffffea0002525488 ffff8880a3f8e4c0 raw: ffff888085757840 ffff888085757000 000000010000000a ffff88805aac40c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88805aac40c0 Memory state around the buggy address: ffff888085757d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888085757d80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888085757e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888085757e80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888085757f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================