==================================================================
BUG: KASAN: use-after-free in relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755
Read of size 8 at addr ffff8880a33a2d38 by task syz-executor.2/9816
CPU: 1 PID: 9816 Comm: syz-executor.2 Not tainted 5.3.0-rc6+ #147
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+0x360/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:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x54/0x90 kernel/locking/spinlock.c:199
Code: c0 60 f4 d2 88 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 33 48 83 3d 15 20 95 01 00 74 20 fb 66 0f 1f 44 00 00 01 00 00 00 e8 d2 eb 10 fa 65 8b 05 a3 29 c4 78 85 c0 74 06 41
RSP: 0018:ffff8880940efb20 EFLAGS: 00000282 ORIG_RAX: ffffffffffffffdd
RAX: 1ffffffff11a5e8c RBX: ffff8880940e42c0 RCX: 1ffffffff134b5de
RDX: dffffc0000000000 RSI: ffffffff8177f03e RDI: ffffffff873dd428
RBP: ffff8880940efb28 R08: ffff8880940e42c0 R09: ffffed1015d26ad1
R10: ffffed1015d26ad0 R11: ffff8880ae935683 R12: ffff8880ae935680
R13: ffff8880a8daa4c0 R14: 0000000000000000 R15: 0000000000000001
finish_lock_switch kernel/sched/core.c:3004 [inline]
finish_task_switch+0x147/0x720 kernel/sched/core.c:3104
context_switch kernel/sched/core.c:3257 [inline]
__schedule+0x75d/0x1580 kernel/sched/core.c:3880
schedule+0xd9/0x260 kernel/sched/core.c:3947
freezable_schedule include/linux/freezer.h:172 [inline]
do_nanosleep+0x201/0x6a0 kernel/time/hrtimer.c:1679
hrtimer_nanosleep+0x2a6/0x570 kernel/time/hrtimer.c:1733
__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: 00000000000caec2 RCX: 0000000000457d20
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000a6fd90
RBP: 00000000000012ae R08: 0000000000000001 R09: 00005555559d3940
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000001b
R13: 0000000000a6fde0 R14: 00000000000cadef R15: 0000000000a6fdf0
Allocated by task 16315:
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
d_alloc_parallel+0xf4/0x1c30 fs/dcache.c:2519
__lookup_slow+0x1ab/0x500 fs/namei.c:1652
lookup_slow+0x58/0x80 fs/namei.c:1686
walk_component+0x747/0x2000 fs/namei.c:1808
link_path_walk.part.0+0x5ab/0x1340 fs/namei.c:2136
link_path_walk fs/namei.c:2070 [inline]
path_openat+0x202/0x4630 fs/namei.c:3532
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: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 ffff8880a33a2ce0
which belongs to the cache dentry(65:syz3) of size 288
The buggy address is located 88 bytes inside of
288-byte region [ffff8880a33a2ce0, ffff8880a33a2e00)
The buggy address belongs to the page:
page:ffffea00028ce880 refcount:1 mapcount:0 mapping:ffff888090aefe00 index:0x0
flags: 0x1fffc0000000200(slab)
raw: 01fffc0000000200 ffffea000254bf88 ffffea000254b6c8 ffff888090aefe00
raw: 0000000000000000 ffff8880a33a2080 000000010000000b 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880a33a2c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a33a2c80: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb
>ffff8880a33a2d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880a33a2d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a33a2e00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
==================================================================