================================================================== BUG: KASAN: use-after-free in relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755 Read of size 8 at addr ffff88803e9201b8 by task syz-executor.5/11782 CPU: 0 PID: 11782 Comm: syz-executor.5 Not tainted 5.3.0-rc8+ #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.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:618 __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 submit_bh_wbc+0x6b6/0x900 fs/buffer.c:3095 submit_bh fs/buffer.c:3101 [inline] __bread_slow fs/buffer.c:1177 [inline] __bread_gfp+0x164/0x370 fs/buffer.c:1359 sb_bread include/linux/buffer_head.h:307 [inline] fat_fill_super+0x353/0x3890 fs/fat/inode.c:1641 msdos_fill_super+0x2f/0x40 fs/fat/namei_msdos.c:653 mount_bdev+0x304/0x3c0 fs/super.c:1283 msdos_mount+0x35/0x40 fs/fat/namei_msdos.c:660 legacy_get_tree+0x108/0x220 fs/fs_context.c:661 vfs_get_tree+0x8e/0x390 fs/super.c:1413 do_new_mount fs/namespace.c:2791 [inline] do_mount+0x13b3/0x1c30 fs/namespace.c:3111 ksys_mount+0xdb/0x150 fs/namespace.c:3320 __do_sys_mount fs/namespace.c:3334 [inline] __se_sys_mount fs/namespace.c:3331 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3331 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c33a Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 9d 8d fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 7a 8d fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f6ce74e5a88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f6ce74e5b40 RCX: 000000000045c33a RDX: 00007f6ce74e5ae0 RSI: 0000000020000340 RDI: 00007f6ce74e5b00 RBP: 0000000000000000 R08: 00007f6ce74e5b40 R09: 00007f6ce74e5ae0 R10: 0000000000004000 R11: 0000000000000206 R12: 0000000000000003 R13: 00000000004c8abc R14: 00000000004dfa38 R15: 00000000ffffffff Allocated by task 9145: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:493 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:466 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:501 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 __lookup_hash+0xcd/0x190 fs/namei.c:1540 filename_create+0x1a7/0x4f0 fs/namei.c:3635 user_path_create fs/namei.c:3692 [inline] do_symlinkat+0xf3/0x290 fs/namei.c:4147 __do_sys_symlink fs/namei.c:4173 [inline] __se_sys_symlink fs/namei.c:4171 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4171 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8720: 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:455 kasan_slab_free+0xe/0x10 mm/kasan/common.c:463 __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 ffff88803e920160 which belongs to the cache dentry(102:syz5) of size 288 The buggy address is located 88 bytes inside of 288-byte region [ffff88803e920160, ffff88803e920280) The buggy address belongs to the page: page:ffffea0000fa4800 refcount:1 mapcount:0 mapping:ffff888096ce0c40 index:0xffff88803e9206e0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0001344d08 ffffea0000fa2bc8 ffff888096ce0c40 raw: ffff88803e9206e0 ffff88803e920000 000000010000000a 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88803e920080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88803e920100: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb >ffff88803e920180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803e920200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88803e920280: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================