================================================================== BUG: KASAN: use-after-free in debugfs_remove+0x10d/0x130 fs/debugfs/inode.c:684 Read of size 8 at addr ffff888091ca5a20 by task syz-executor.2/30421 CPU: 0 PID: 30421 Comm: syz-executor.2 Not tainted 5.1.0+ #16 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+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 debugfs_remove+0x10d/0x130 fs/debugfs/inode.c:684 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:731 compat_blkdev_ioctl+0x461/0x1a60 block/compat_ioctl.c:402 __do_compat_sys_ioctl fs/compat_ioctl.c:1052 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:998 [inline] __ia32_compat_sys_ioctl+0x197/0x620 fs/compat_ioctl.c:998 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x281/0xd83 arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7ff7849 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 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:00000000f5df30cc 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 25222: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc mm/slab.c:3356 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3518 __d_alloc+0x2e/0x8c0 fs/dcache.c:1621 d_alloc+0x4d/0x280 fs/dcache.c:1700 d_alloc_parallel+0xf4/0x1bc0 fs/dcache.c:2454 __lookup_slow+0x1ab/0x500 fs/namei.c:1652 lookup_one_len+0x16d/0x1a0 fs/namei.c:2541 start_creating fs/debugfs/inode.c:307 [inline] start_creating+0xbf/0x1e0 fs/debugfs/inode.c:283 __debugfs_create_file+0x65/0x3d0 fs/debugfs/inode.c:346 debugfs_create_file+0x5a/0x70 fs/debugfs/inode.c:399 blk_create_buf_file_callback+0x33/0x40 kernel/trace/blktrace.c:444 relay_create_buf_file+0xfb/0x180 kernel/relay.c:428 relay_open_buf.part.0+0x773/0xb60 kernel/relay.c:457 relay_open_buf kernel/relay.c:449 [inline] relay_open kernel/relay.c:599 [inline] relay_open+0x523/0x980 kernel/relay.c:563 do_blk_trace_setup+0x414/0xb90 kernel/trace/blktrace.c:532 compat_blk_trace_setup+0x13e/0x1f0 kernel/trace/blktrace.c:623 blk_trace_ioctl+0x293/0x300 kernel/trace/blktrace.c:721 compat_blkdev_ioctl+0x461/0x1a60 block/compat_ioctl.c:402 __do_compat_sys_ioctl fs/compat_ioctl.c:1052 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:998 [inline] __ia32_compat_sys_ioctl+0x197/0x620 fs/compat_ioctl.c:998 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x281/0xd83 arch/x86/entry/common.c:408 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:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3462 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3728 __d_free+0x20/0x30 fs/dcache.c:270 __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 ffff888091ca59e0 which belongs to the cache dentry(65:syz2) of size 288 The buggy address is located 64 bytes inside of 288-byte region [ffff888091ca59e0, ffff888091ca5b00) The buggy address belongs to the page: page:ffffea0002472940 refcount:1 mapcount:0 mapping:ffff88809284ca80 index:0xffff888091ca5880 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00028cba08 ffffea000247ed88 ffff88809284ca80 raw: ffff888091ca5880 ffff888091ca5040 0000000100000006 ffff888065c59a40 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888065c59a40 Memory state around the buggy address: ffff888091ca5900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091ca5980: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb >ffff888091ca5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888091ca5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091ca5b00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================