================================================================== BUG: KASAN: use-after-free in debugfs_remove+0x4f/0xf0 fs/debugfs/inode.c:729 Read of size 8 at addr ffff888091caad20 by task kworker/1:2/26350 CPU: 1 PID: 26350 Comm: kworker/1:2 Not tainted 5.5.0-rc6-syzkaller #0 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+0x1fb/0x318 lib/dump_stack.c:118 print_address_description+0x74/0x5c0 mm/kasan/report.c:374 __kasan_report+0x149/0x1c0 mm/kasan/report.c:506 kasan_report+0x26/0x50 mm/kasan/common.c:639 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 debugfs_remove+0x4f/0xf0 fs/debugfs/inode.c:729 blk_trace_free kernel/trace/blktrace.c:311 [inline] blk_trace_cleanup kernel/trace/blktrace.c:338 [inline] __blk_trace_remove+0xa5/0x180 kernel/trace/blktrace.c:351 blk_trace_shutdown+0x20b/0x260 kernel/trace/blktrace.c:746 __blk_release_queue+0x244/0x2e0 block/blk-sysfs.c:896 process_one_work+0x7f5/0x10d0 kernel/workqueue.c:2264 worker_thread+0xbbc/0x1630 kernel/workqueue.c:2410 kthread+0x332/0x350 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 7589: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc+0x118/0x1c0 mm/kasan/common.c:513 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:521 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x1f5/0x2e0 mm/slab.c:3484 __d_alloc+0x2d/0x6e0 fs/dcache.c:1690 d_alloc fs/dcache.c:1769 [inline] d_alloc_parallel+0x7f/0x1430 fs/dcache.c:2521 __lookup_slow+0xb8/0x370 fs/namei.c:1649 lookup_one_len+0x123/0x220 fs/namei.c:2529 start_creating+0xd3/0x270 fs/debugfs/inode.c:335 __debugfs_create_file+0x75/0x470 fs/debugfs/inode.c:380 debugfs_create_file+0x4a/0x60 fs/debugfs/inode.c:437 do_blk_trace_setup+0x439/0xaa0 kernel/trace/blktrace.c:523 __blk_trace_setup kernel/trace/blktrace.c:570 [inline] blk_trace_ioctl+0x24c/0x7d0 kernel/trace/blktrace.c:709 blkdev_ioctl+0x14c6/0x2a50 block/ioctl.c:568 block_ioctl+0xbd/0x100 fs/block_dev.c:1983 do_vfs_ioctl+0x6e2/0x19b0 fs/ioctl.c:47 ksys_ioctl fs/ioctl.c:749 [inline] __do_sys_ioctl fs/ioctl.c:756 [inline] __se_sys_ioctl fs/ioctl.c:754 [inline] __x64_sys_ioctl+0xe3/0x120 fs/ioctl.c:754 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7602: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x12e/0x1e0 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x81/0xf0 mm/slab.c:3694 __d_free+0x20/0x30 fs/dcache.c:271 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2183 [inline] rcu_core+0x833/0x10a0 kernel/rcu/tree.c:2408 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2417 __do_softirq+0x283/0x7bd arch/x86/include/asm/paravirt.h:762 The buggy address belongs to the object at ffff888091caace0 which belongs to the cache dentry(70:syz3) of size 288 The buggy address is located 64 bytes inside of 288-byte region [ffff888091caace0, ffff888091caae00) The buggy address belongs to the page: page:ffffea0002472a80 refcount:1 mapcount:0 mapping:ffff888094954c40 index:0x0 raw: 00fffe0000000200 ffffea0002574bc8 ffffea0002449988 ffff888094954c40 raw: 0000000000000000 ffff888091caa080 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888091caac00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888091caac80: 00 00 00 00 fc fc fc fc fc fc fc fc fb fb fb fb >ffff888091caad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888091caad80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091caae00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================