================================================================== BUG: KASAN: use-after-free in debugfs_remove+0x10d/0x130 fs/debugfs/inode.c:705 Read of size 8 at addr ffff88804ea5b220 by task syz-executor.2/11384 CPU: 1 PID: 11384 Comm: syz-executor.2 Not tainted 5.3.0-rc3+ #97 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+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:612 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 debugfs_remove+0x10d/0x130 fs/debugfs/inode.c:705 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_ioctl+0x239/0x300 kernel/trace/blktrace.c:725 compat_blkdev_ioctl+0x3fb/0x1b80 block/compat_ioctl.c:402 __do_compat_sys_ioctl fs/compat_ioctl.c:1049 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:995 [inline] __ia32_compat_sys_ioctl+0x195/0x620 fs/compat_ioctl.c:995 do_syscall_32_irqs_on arch/x86/entry/common.c:332 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:403 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7ff1a29 Code: b8 80 96 98 00 eb cc 8b 04 24 c3 8b 1c 24 c3 8b 34 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5ded0cc EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000001276 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 11258: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:487 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:460 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:495 slab_post_alloc_hook mm/slab.h:520 [inline] slab_alloc mm/slab.c:3319 [inline] kmem_cache_alloc+0x121/0x710 mm/slab.c:3483 __d_alloc+0x2e/0x8c0 fs/dcache.c:1688 d_alloc+0x4d/0x280 fs/dcache.c:1767 d_alloc_parallel+0xf4/0x1c30 fs/dcache.c:2519 __lookup_slow+0x1ab/0x500 fs/namei.c:1652 lookup_one_len+0x16d/0x1a0 fs/namei.c:2541 start_creating+0xc5/0x1d0 fs/debugfs/inode.c:312 __debugfs_create_file+0x65/0x3c0 fs/debugfs/inode.c:357 debugfs_create_file+0x5a/0x70 fs/debugfs/inode.c:413 do_blk_trace_setup+0x361/0xb50 kernel/trace/blktrace.c:524 compat_blk_trace_setup+0x13e/0x1f0 kernel/trace/blktrace.c:617 blk_trace_ioctl+0x293/0x300 kernel/trace/blktrace.c:715 compat_blkdev_ioctl+0x3fb/0x1b80 block/compat_ioctl.c:402 __do_compat_sys_ioctl fs/compat_ioctl.c:1049 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:995 [inline] __ia32_compat_sys_ioctl+0x195/0x620 fs/compat_ioctl.c:995 do_syscall_32_irqs_on arch/x86/entry/common.c:332 [inline] do_fast_syscall_32+0x27b/0xdb3 arch/x86/entry/common.c:403 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 9: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:449 kasan_slab_free+0xe/0x10 mm/kasan/common.c:457 __cache_free mm/slab.c:3425 [inline] kmem_cache_free+0x86/0x320 mm/slab.c:3693 __d_free+0x20/0x30 fs/dcache.c:271 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2114 [inline] rcu_core+0x67f/0x1580 kernel/rcu/tree.c:2314 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2323 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff88804ea5b1e0 which belongs to the cache dentry(55:syz2) of size 288 The buggy address is located 64 bytes inside of 288-byte region [ffff88804ea5b1e0, ffff88804ea5b300) The buggy address belongs to the page: page:ffffea00013a96c0 refcount:1 mapcount:0 mapping:ffff888096f6a1c0 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00024a9848 ffffea00022a9d88 ffff888096f6a1c0 raw: 0000000000000000 ffff88804ea5b080 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804ea5b100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804ea5b180: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb >ffff88804ea5b200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804ea5b280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804ea5b300: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================