audit: type=1800 audit(1581678348.645:497): pid=2883 uid=0 auid=4294967295 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="sda1" ino=17394 res=0 ================================================================== BUG: KASAN: use-after-free in debugfs_remove fs/debugfs/inode.c:662 [inline] BUG: KASAN: use-after-free in debugfs_remove+0xfb/0x120 fs/debugfs/inode.c:654 Read of size 8 at addr ffff8880681d55c0 by task kworker/0:1/24 CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.14.170-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:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 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+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 debugfs_remove fs/debugfs/inode.c:662 [inline] debugfs_remove+0xfb/0x120 fs/debugfs/inode.c:654 blk_trace_free+0x38/0x140 kernel/trace/blktrace.c:324 blk_trace_cleanup kernel/trace/blktrace.c:351 [inline] blk_trace_remove+0x59/0x80 kernel/trace/blktrace.c:364 blk_trace_shutdown+0x4f/0x60 kernel/trace/blktrace.c:728 __blk_release_queue+0x22e/0x4d0 block/blk-sysfs.c:830 process_one_work+0x863/0x1600 kernel/workqueue.c:2114 worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248 kthread+0x319/0x430 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 2839: 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 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x780 mm/slab.c:3552 __d_alloc+0x2d/0x9f0 fs/dcache.c:1623 d_alloc+0x4d/0x270 fs/dcache.c:1710 __lookup_hash fs/namei.c:1571 [inline] __lookup_hash+0x58/0x180 fs/namei.c:1563 lookup_one_len+0x27b/0x3a0 fs/namei.c:2539 start_creating fs/debugfs/inode.c:314 [inline] start_creating+0xa6/0x1b0 fs/debugfs/inode.c:290 __debugfs_create_file+0x53/0x3d0 fs/debugfs/inode.c:353 debugfs_create_file+0x5a/0x70 fs/debugfs/inode.c:404 do_blk_trace_setup+0x32d/0xb10 kernel/trace/blktrace.c:529 blk_trace_setup+0xbd/0x140 kernel/trace/blktrace.c:579 blk_trace_ioctl+0x147/0x270 kernel/trace/blktrace.c:694 blkdev_ioctl+0x100/0x1850 block/ioctl.c:580 block_ioctl+0xde/0x120 fs/block_dev.c:1881 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 17: 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] kmem_cache_free+0x83/0x2b0 mm/slab.c:3758 __d_free+0x20/0x30 fs/dcache.c:270 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x7b8/0x12b0 kernel/rcu/tree.c:2946 __do_softirq+0x244/0x9a0 kernel/softirq.c:288 The buggy address belongs to the object at ffff8880681d5580 which belongs to the cache dentry of size 288 The buggy address is located 64 bytes inside of 288-byte region [ffff8880681d5580, ffff8880681d56a0) The buggy address belongs to the page: page:ffffea0001a07540 count:1 mapcount:0 mapping:ffff8880681d5000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880681d5000 0000000000000000 000000010000000b raw: ffffea0002508860 ffffea00025bff60 ffff88821f8b5680 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880681d5480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880681d5500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880681d5580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880681d5600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880681d5680: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb ==================================================================