================================================================== BUG: KASAN: use-after-free in debugfs_remove+0x10d/0x130 fs/debugfs/inode.c:690 Read of size 8 at addr ffff88805041fe80 by task kworker/0:3/7736 CPU: 0 PID: 7736 Comm: kworker/0:3 Not tainted 5.1.0-rc4-next-20190415 #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events __blk_release_queue 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:316 kasan_report+0x12/0x20 mm/kasan/common.c:623 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 debugfs_remove+0x10d/0x130 fs/debugfs/inode.c:690 blk_trace_free+0x38/0x140 kernel/trace/blktrace.c:312 blk_trace_cleanup kernel/trace/blktrace.c:339 [inline] __blk_trace_remove+0x78/0xa0 kernel/trace/blktrace.c:352 blk_trace_shutdown+0x67/0x90 kernel/trace/blktrace.c:753 __blk_release_queue+0x1dc/0x3a0 block/blk-sysfs.c:866 process_one_work+0x98e/0x1790 kernel/workqueue.c:2274 worker_thread+0x98/0xe40 kernel/workqueue.c:2420 kthread+0x357/0x430 kernel/kthread.c:254 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Allocated by task 17443: save_stack+0x45/0xd0 mm/kasan/common.c:76 set_track mm/kasan/common.c:88 [inline] __kasan_kmalloc mm/kasan/common.c:498 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:471 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:506 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc mm/slab.c:3392 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3554 __d_alloc+0x2e/0x8c0 fs/dcache.c:1622 d_alloc+0x4d/0x280 fs/dcache.c:1701 d_alloc_parallel+0xf4/0x1bc0 fs/dcache.c:2455 __lookup_slow+0x1ab/0x500 fs/namei.c:1652 lookup_one_len+0x16d/0x1a0 fs/namei.c:2541 start_creating fs/debugfs/inode.c:313 [inline] start_creating+0xbf/0x1e0 fs/debugfs/inode.c:289 __debugfs_create_file+0x65/0x400 fs/debugfs/inode.c:352 debugfs_create_file+0x5a/0x70 fs/debugfs/inode.c:405 do_blk_trace_setup+0x376/0xb90 kernel/trace/blktrace.c:528 __blk_trace_setup+0xe3/0x190 kernel/trace/blktrace.c:577 blk_trace_ioctl+0x170/0x300 kernel/trace/blktrace.c:716 blkdev_ioctl+0x276/0x1d10 block/ioctl.c:591 block_ioctl+0xee/0x130 fs/block_dev.c:1931 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 Freed by task 9: save_stack+0x45/0xd0 mm/kasan/common.c:76 set_track mm/kasan/common.c:88 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:460 kasan_slab_free+0xe/0x10 mm/kasan/common.c:468 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3764 __d_free+0x20/0x30 fs/dcache.c:269 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2092 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2310 [inline] rcu_core+0xbac/0x1510 kernel/rcu/tree.c:2291 __do_softirq+0x266/0x95a kernel/softirq.c:293 The buggy address belongs to the object at ffff88805041fe40 which belongs to the cache dentry(65:syz1) of size 288 The buggy address is located 64 bytes inside of 288-byte region [ffff88805041fe40, ffff88805041ff60) The buggy address belongs to the page: page:ffffea00014107c0 count:1 mapcount:0 mapping:ffff8880937da780 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0001343dc8 ffffea0001342b88 ffff8880937da780 raw: 0000000000000000 ffff88805041f080 000000010000000b ffff888097ffe240 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888097ffe240 Memory state around the buggy address: ffff88805041fd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805041fe00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff88805041fe80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805041ff00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88805041ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================