================================================================== BUG: KASAN: use-after-free in debugfs_remove+0x4f/0xf0 fs/debugfs/inode.c:684 Read of size 8 at addr ffff8880911f2640 by task kworker/0:2/2993 CPU: 0 PID: 2993 Comm: kworker/0:2 Not tainted 5.2.0-rc5+ #5 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+0x1d8/0x2f8 lib/dump_stack.c:113 print_address_description+0x6d/0x310 mm/kasan/report.c:188 __kasan_report+0x14b/0x1c0 mm/kasan/report.c:317 kasan_report+0x26/0x50 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 debugfs_remove+0x4f/0xf0 fs/debugfs/inode.c:684 blk_trace_free kernel/trace/blktrace.c:312 [inline] blk_trace_cleanup kernel/trace/blktrace.c:339 [inline] __blk_trace_remove+0xa5/0x180 kernel/trace/blktrace.c:352 blk_trace_shutdown+0x20b/0x260 kernel/trace/blktrace.c:753 __blk_release_queue+0x1b0/0x250 block/blk-sysfs.c:902 process_one_work+0x814/0x1130 kernel/workqueue.c:2269 worker_thread+0xc01/0x1640 kernel/workqueue.c:2415 kthread+0x325/0x350 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 7907: save_stack mm/kasan/common.c:71 [inline] set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc+0x11c/0x1b0 mm/kasan/common.c:489 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc mm/slab.c:3326 [inline] kmem_cache_alloc+0x1dd/0x2b0 mm/slab.c:3488 __d_alloc+0x2d/0x6e0 fs/dcache.c:1622 d_alloc fs/dcache.c:1701 [inline] d_alloc_parallel+0xcc/0x1560 fs/dcache.c:2455 __lookup_slow+0xfc/0x410 fs/namei.c:1652 lookup_one_len+0x173/0x2a0 fs/namei.c:2541 start_creating+0xe3/0x1b0 fs/debugfs/inode.c:307 __debugfs_create_file+0x75/0x480 fs/debugfs/inode.c:346 debugfs_create_file+0x4a/0x60 fs/debugfs/inode.c:399 do_blk_trace_setup+0x422/0xa90 kernel/trace/blktrace.c:528 __blk_trace_setup kernel/trace/blktrace.c:577 [inline] blk_trace_ioctl+0x2e8/0x8a0 kernel/trace/blktrace.c:716 blkdev_ioctl+0x14c0/0x2c10 block/ioctl.c:592 block_ioctl+0xbd/0x100 fs/block_dev.c:1930 do_vfs_ioctl+0x7d4/0x1890 fs/ioctl.c:46 ksys_ioctl fs/ioctl.c:713 [inline] __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0xe3/0x120 fs/ioctl.c:718 do_syscall_64+0xfe/0x140 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 16: save_stack mm/kasan/common.c:71 [inline] set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x12a/0x1e0 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kmem_cache_free+0xcb/0x170 mm/slab.c:3698 __d_free+0x20/0x30 fs/dcache.c:271 __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+0x8d6/0xf90 kernel/rcu/tree.c:2291 __do_softirq+0x340/0x7b0 arch/x86/include/asm/paravirt.h:777 The buggy address belongs to the object at ffff8880911f2600 which belongs to the cache dentry(65:syz5) of size 288 The buggy address is located 64 bytes inside of 288-byte region [ffff8880911f2600, ffff8880911f2720) The buggy address belongs to the page: page:ffffea0002447c80 refcount:1 mapcount:0 mapping:ffff8880a46d4940 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00024e56c8 ffff88809eee6b48 ffff8880a46d4940 raw: 0000000000000000 ffff8880911f2080 000000010000000b ffff888083fea240 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888083fea240 Memory state around the buggy address: ffff8880911f2500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880911f2580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880911f2600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880911f2680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880911f2700: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb ==================================================================