================================================================== BUG: KASAN: use-after-free in relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755 Read of size 8 at addr ffff888092a267b8 by task syz-executor.3/7748 CPU: 0 PID: 7748 Comm: syz-executor.3 Not tainted 5.3.0-rc2+ #115 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 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+0x16c3/0x21a0 block/blk-core.c:954 generic_make_request+0x8f/0xb50 block/blk-core.c:1006 submit_bio+0x104/0x4d0 block/blk-core.c:1163 mpage_bio_submit fs/mpage.c:66 [inline] mpage_readpages+0x466/0x630 fs/mpage.c:410 blkdev_readpages+0x2d/0x40 fs/block_dev.c:663 read_pages+0x108/0x540 mm/readahead.c:126 __do_page_cache_readahead+0x4e0/0x5d0 mm/readahead.c:212 ra_submit mm/internal.h:62 [inline] ondemand_readahead+0x561/0xd40 mm/readahead.c:492 page_cache_sync_readahead mm/readahead.c:527 [inline] page_cache_sync_readahead+0x281/0x520 mm/readahead.c:509 generic_file_buffered_read mm/filemap.c:2071 [inline] generic_file_read_iter+0x10f1/0x1ce0 mm/filemap.c:2344 blkdev_read_iter+0x120/0x190 fs/block_dev.c:2047 call_read_iter include/linux/fs.h:1864 [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+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459829 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:00007f34d6519c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459829 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000040fdf R11: 0000000000000246 R12: 00007f34d651a6d4 R13: 00000000004c6ff7 R14: 00000000004dc558 R15: 00000000ffffffff Allocated by task 9697: 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_anon fs/dcache.c:1786 [inline] d_alloc_cursor+0x3f/0xe0 fs/dcache.c:1792 dcache_dir_open+0x37/0x90 fs/libfs.c:78 do_dentry_open+0x4df/0x1250 fs/open.c:797 vfs_open+0xa0/0xd0 fs/open.c:906 do_last fs/namei.c:3416 [inline] path_openat+0x10e9/0x4630 fs/namei.c:3533 do_filp_open+0x1a1/0x280 fs/namei.c:3563 do_sys_open+0x3fe/0x5d0 fs/open.c:1089 __do_sys_open fs/open.c:1107 [inline] __se_sys_open fs/open.c:1102 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1102 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 16: 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 ffff888092a26760 which belongs to the cache dentry(49:syz2) of size 288 The buggy address is located 88 bytes inside of 288-byte region [ffff888092a26760, ffff888092a26880) The buggy address belongs to the page: page:ffffea00024a8980 refcount:1 mapcount:0 mapping:ffff8880902b6380 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00025310c8 ffffea00025322c8 ffff8880902b6380 raw: 0000000000000000 ffff888092a26080 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888092a26680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888092a26700: 00 00 00 00 fc fc fc fc fc fc fc fc fb fb fb fb >ffff888092a26780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888092a26800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888092a26880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================