================================================================== BUG: KASAN: use-after-free in relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755 Read of size 8 at addr ffff8880a32bea38 by task syz-executor.4/11459 CPU: 0 PID: 11459 Comm: syz-executor.4 Not tainted 5.4.0-rc3+ #0 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.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755 relay_reserve include/linux/relay.h:261 [inline] trace_note.isra.0+0x5b8/0x6e0 kernel/trace/blktrace.c:93 trace_note_tsk kernel/trace/blktrace.c:124 [inline] __blk_add_trace+0xb70/0xe10 kernel/trace/blktrace.c:264 blk_add_trace_bio.isra.0+0x19c/0x220 kernel/trace/blktrace.c:865 blk_add_trace_bio_queue+0x46/0x60 kernel/trace/blktrace.c:902 trace_block_bio_queue include/trace/events/block.h:357 [inline] generic_make_request_checks+0x1b1a/0x2210 block/blk-core.c:966 generic_make_request+0x8f/0xb50 block/blk-core.c:1018 submit_bio+0x113/0x600 block/blk-core.c:1190 __blkdev_direct_IO_simple+0x55b/0x9e0 fs/block_dev.c:251 blkdev_direct_IO+0xc16/0x1400 fs/block_dev.c:474 generic_file_read_iter+0x344/0x2c00 mm/filemap.c:2302 blkdev_read_iter+0x120/0x190 fs/block_dev.c:2010 call_read_iter include/linux/fs.h:1889 [inline] generic_file_splice_read+0x4af/0x800 fs/splice.c:307 do_splice_to+0x127/0x180 fs/splice.c:877 splice_direct_to_actor+0x2d2/0x970 fs/splice.c:954 do_splice_direct+0x1da/0x2a0 fs/splice.c:1063 do_sendfile+0x597/0xd00 fs/read_write.c:1464 __do_sys_sendfile64 fs/read_write.c:1525 [inline] __se_sys_sendfile64 fs/read_write.c:1511 [inline] __x64_sys_sendfile64+0x1dd/0x220 fs/read_write.c:1511 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a59 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffaad753c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459a59 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000006 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000102000002 R11: 0000000000000246 R12: 00007ffaad7546d4 R13: 00000000004c74af R14: 00000000004dd190 R15: 00000000ffffffff Allocated by task 26465: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:510 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:518 slab_post_alloc_hook mm/slab.h:584 [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_open+0x525/0x1a90 fs/namei.c:3137 do_last fs/namei.c:3314 [inline] path_openat+0x1eb2/0x46d0 fs/namei.c:3525 do_filp_open+0x1a1/0x280 fs/namei.c:3555 do_sys_open+0x3fe/0x5d0 fs/open.c:1097 __do_sys_open fs/open.c:1115 [inline] __se_sys_open fs/open.c:1110 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1110 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 3899: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __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:2157 [inline] rcu_core+0x581/0x1560 kernel/rcu/tree.c:2377 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2386 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff8880a32be9e0 which belongs to the cache dentry(81:syz5) of size 288 The buggy address is located 88 bytes inside of 288-byte region [ffff8880a32be9e0, ffff8880a32beb00) The buggy address belongs to the page: page:ffffea00028caf80 refcount:1 mapcount:0 mapping:ffff8880a738a700 index:0xffff8880a32be9e0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0001c84f48 ffffea00025cf488 ffff8880a738a700 raw: ffff8880a32be9e0 ffff8880a32be040 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a32be900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a32be980: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb >ffff8880a32bea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a32bea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a32beb00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================