================================================================== BUG: KASAN: use-after-free in relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755 Read of size 8 at addr ffff8880698b24b8 by task syz-executor.4/10002 CPU: 1 PID: 10002 Comm: syz-executor.4 Not tainted 5.3.0-rc6 #146 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_rq+0x185/0x1f0 kernel/trace/blktrace.c:813 blk_add_trace_rq_complete+0x17a/0x1e0 kernel/trace/blktrace.c:842 trace_block_rq_complete include/trace/events/block.h:116 [inline] blk_update_request+0x851/0xc10 block/blk-core.c:1403 scsi_end_request+0x7f/0x840 drivers/scsi/scsi_lib.c:579 scsi_io_completion+0x20a/0x1420 drivers/scsi/scsi_lib.c:963 scsi_finish_command+0x3b7/0x670 drivers/scsi/scsi.c:228 scsi_softirq_done+0x326/0x3b0 drivers/scsi/scsi_lib.c:1465 blk_done_softirq+0x2fe/0x4d0 block/blk-softirq.c:37 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:537 [inline] do_IRQ+0x12c/0x200 arch/x86/kernel/irq.c:259 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:607 RIP: 0010:__debug_object_init+0x48/0xee0 lib/debugobjects.c:529 Code: 55 49 89 fd 41 54 4d 89 ec 53 48 8d 5d d8 49 c1 ec 0c 48 81 ec d8 00 00 00 48 89 85 68 ff ff ff 4c 01 f8 48 89 b5 58 ff ff ff <89> 95 54 ff ff ff 48 c7 85 78 ff ff ff b3 8a b5 41 48 c7 45 80 aa RSP: 0018:ffff88805fbbfc58 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffdd RAX: ffffed100bf77f9a RBX: ffff88805fbbfd30 RCX: ffffffff81630205 RDX: 0000000000000001 RSI: ffffffff88dba4e0 RDI: ffff88805fbbfdc0 RBP: ffff88805fbbfd58 R08: ffff88805fbb4380 R09: ffffed100bf77fc4 R10: ffffed100bf77fc3 R11: ffff88805fbbfe1f R12: 000ffff88805fbbf R13: ffff88805fbbfdc0 R14: ffff88805fbbfdc0 R15: dffffc0000000000 debug_object_init_on_stack+0x19/0x20 lib/debugobjects.c:606 hrtimer_init_on_stack kernel/time/hrtimer.c:425 [inline] hrtimer_nanosleep+0x17a/0x570 kernel/time/hrtimer.c:1731 __do_sys_nanosleep kernel/time/hrtimer.c:1767 [inline] __se_sys_nanosleep kernel/time/hrtimer.c:1754 [inline] __x64_sys_nanosleep+0x1a6/0x220 kernel/time/hrtimer.c:1754 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457d20 Code: c0 5b 5d c3 66 0f 1f 44 00 00 8b 04 24 48 83 c4 18 5b 5d c3 66 0f 1f 44 00 00 83 3d 31 ea 61 00 00 75 14 b8 23 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 24 d3 fb ff c3 48 83 ec 08 e8 ea 46 00 00 RSP: 002b:0000000000a6fd88 EFLAGS: 00000246 ORIG_RAX: 0000000000000023 RAX: ffffffffffffffda RBX: 0000000000194ece RCX: 0000000000457d20 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000a6fd90 RBP: 0000000000002e8a R08: 0000000000000001 R09: 000055555591c940 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000017 R13: 0000000000a6fde0 R14: 0000000000194b77 R15: 0000000000a6fdf0 Allocated by task 10002: 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_pseudo+0x1e/0x70 fs/dcache.c:1817 alloc_file_pseudo+0xe2/0x280 fs/file_table.c:225 sock_alloc_file+0x50/0x180 net/socket.c:397 sock_map_fd net/socket.c:420 [inline] __sys_socket+0x150/0x220 net/socket.c:1515 __do_sys_socket net/socket.c:1520 [inline] __se_sys_socket net/socket.c:1518 [inline] __x64_sys_socket+0x73/0xb0 net/socket.c:1518 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10002: 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 fs/dcache.c:271 [inline] dentry_free+0xe9/0x160 fs/dcache.c:348 __dentry_kill+0x457/0x600 fs/dcache.c:593 dentry_kill fs/dcache.c:686 [inline] dput+0x819/0xde0 fs/dcache.c:859 __fput+0x424/0x890 fs/file_table.c:293 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x5a9/0x6a0 arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880698b2460 which belongs to the cache dentry(81:syz4) of size 288 The buggy address is located 88 bytes inside of 288-byte region [ffff8880698b2460, ffff8880698b2580) The buggy address belongs to the page: page:ffffea0001a62c80 refcount:1 mapcount:0 mapping:ffff88808acfc700 index:0xffff8880698b2300 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00008aac08 ffffea0002538c48 ffff88808acfc700 raw: ffff8880698b2300 ffff8880698b2040 0000000100000009 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880698b2380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880698b2400: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb >ffff8880698b2480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880698b2500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880698b2580: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================