================================================================== BUG: KASAN: use-after-free in d_inode include/linux/dcache.h:520 [inline] BUG: KASAN: use-after-free in relay_switch_subbuf+0x88b/0x8f0 kernel/relay.c:759 Read of size 8 at addr ffff888057c99a38 by task syz-executor.5/7151 CPU: 1 PID: 7151 Comm: syz-executor.5 Not tainted 4.14.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/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/0x2b9 mm/kasan/report.c:393 d_inode include/linux/dcache.h:520 [inline] relay_switch_subbuf+0x88b/0x8f0 kernel/relay.c:759 relay_flush kernel/relay.c:887 [inline] relay_flush+0x1a7/0x270 kernel/relay.c:871 __blk_trace_startstop+0x21f/0x600 kernel/trace/blktrace.c:683 blk_trace_ioctl+0x1a1/0x260 kernel/trace/blktrace.c:742 blkdev_ioctl+0xe9/0x17c0 block/ioctl.c:580 block_ioctl+0xd9/0x120 fs/block_dev.c:1881 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xfe0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45cba9 RSP: 002b:00007fdee53dcc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004e2b00 RCX: 000000000045cba9 RDX: 0000000000000000 RSI: 0000000000001275 RDI: 0000000000000007 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000238 R14: 00000000004c4997 R15: 00007fdee53dd6d4 Allocated by task 7155: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552 __d_alloc+0x2a/0x9b0 fs/dcache.c:1623 d_alloc+0x46/0x240 fs/dcache.c:1710 __lookup_hash fs/namei.c:1571 [inline] __lookup_hash+0x51/0x180 fs/namei.c:1563 do_unlinkat+0x219/0x5c0 fs/namei.c:4079 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 17: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xaf/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758 __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+0x78d/0x1180 kernel/rcu/tree.c:2946 __do_softirq+0x254/0x9bf kernel/softirq.c:288 The buggy address belongs to the object at ffff888057c999e0 which belongs to the cache dentry of size 288 The buggy address is located 88 bytes inside of 288-byte region [ffff888057c999e0, ffff888057c99b00) The buggy address belongs to the page: page:ffffea00015f2640 count:1 mapcount:0 mapping:ffff888057c99040 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff888057c99040 0000000000000000 000000010000000b raw: ffffea0001403e20 ffffea000213ca20 ffff88821f8bc680 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888057c99900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888057c99980: 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 >ffff888057c99a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888057c99a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888057c99b00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================