==================================================================
BUG: KASAN: use-after-free in d_inode include/linux/dcache.h:516 [inline]
BUG: KASAN: use-after-free in relay_switch_subbuf+0x8cc/0x940 kernel/relay.c:761
Read of size 8 at addr ffff888095e88478 by task syz-executor.1/3409
CPU: 0 PID: 3409 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
kasan_report mm/kasan/report.c:412 [inline]
__asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433
d_inode include/linux/dcache.h:516 [inline]
relay_switch_subbuf+0x8cc/0x940 kernel/relay.c:761
relay_reserve include/linux/relay.h:261 [inline]
trace_note+0x5eb/0x750 kernel/trace/blktrace.c:96
trace_note_tsk kernel/trace/blktrace.c:127 [inline]
__blk_add_trace+0xb86/0xe20 kernel/trace/blktrace.c:267
blk_add_trace_rq+0x36e/0x470 kernel/trace/blktrace.c:858
trace_block_rq_complete include/trace/events/block.h:116 [inline]
blk_update_request+0x74c/0xaf0 block/blk-core.c:3091
scsi_end_request+0x7d/0xb60 drivers/scsi/scsi_lib.c:673
scsi_io_completion+0x852/0x17c0 drivers/scsi/scsi_lib.c:1103
scsi_softirq_done+0x336/0x3d0 drivers/scsi/scsi_lib.c:1759
__blk_mq_complete_request block/blk-mq.c:583 [inline]
blk_mq_complete_request+0x472/0x660 block/blk-mq.c:620
virtscsi_vq_done drivers/scsi/virtio_scsi.c:223 [inline]
virtscsi_req_done+0x14b/0x210 drivers/scsi/virtio_scsi.c:238
vring_interrupt+0x12f/0x220 drivers/virtio/virtio_ring.c:953
__handle_irq_event_percpu+0x27e/0x8e0 kernel/irq/handle.c:149
handle_irq_event_percpu kernel/irq/handle.c:189 [inline]
handle_irq_event+0x102/0x290 kernel/irq/handle.c:206
handle_edge_irq+0x260/0xcf0 kernel/irq/chip.c:800
generic_handle_irq_desc include/linux/irqdesc.h:155 [inline]
handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87
do_IRQ+0x93/0x1c0 arch/x86/kernel/irq.c:246
common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:670
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x50/0x80 kernel/locking/spinlock.c:192
Code: c0 98 82 f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 31 48 83 3d 01 31 d8 01 00 74 25 fb 66 0f 1f 44 00 00 01 00 00 00 e8 26 1b 28 f9 65 8b 05 9f 8d e8 77 85 c0 74 02 5d
RSP: 0018:ffff8880b3e97eb0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9
RAX: 1ffffffff13e3053 RBX: ffff8880a2e805c0 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff8880a2e80e44
RBP: ffff8880ba02b0c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880ba02b0c0
R13: ffff88809ad8a040 R14: 0000000000000000 R15: 0000000000000002
finish_lock_switch kernel/sched/core.c:2578 [inline]
finish_task_switch+0x146/0x760 kernel/sched/core.c:2678
schedule_tail+0x13/0x1f0 kernel/sched/core.c:2774
ret_from_fork+0x8/0x30 arch/x86/entry/entry_64.S:399
Allocated by task 3383:
kmem_cache_alloc+0x122/0x370 mm/slab.c:3559
__d_alloc+0x2b/0xa10 fs/dcache.c:1612
d_alloc+0x4a/0x230 fs/dcache.c:1696
d_alloc_parallel+0xeb/0x19e0 fs/dcache.c:2443
lookup_open+0x4ea/0x1a20 fs/namei.c:3148
do_last fs/namei.c:3327 [inline]
path_openat+0x1094/0x2df0 fs/namei.c:3537
do_filp_open+0x18c/0x3f0 fs/namei.c:3567
do_sys_open+0x3b3/0x520 fs/open.c:1085
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 3295:
__cache_free mm/slab.c:3503 [inline]
kmem_cache_free+0x7f/0x260 mm/slab.c:3765
__rcu_reclaim kernel/rcu/rcu.h:236 [inline]
rcu_do_batch kernel/rcu/tree.c:2584 [inline]
invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline]
__rcu_process_callbacks kernel/rcu/tree.c:2864 [inline]
rcu_process_callbacks+0x8ff/0x18b0 kernel/rcu/tree.c:2881
__do_softirq+0x265/0x980 kernel/softirq.c:292
The buggy address belongs to the object at ffff888095e88420
which belongs to the cache dentry of size 288
The buggy address is located 88 bytes inside of
288-byte region [ffff888095e88420, ffff888095e88540)
The buggy address belongs to the page:
page:ffffea000257a200 count:1 mapcount:0 mapping:ffff88813be45200 index:0x0
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea0002c6bc88 ffffea00023132c8 ffff88813be45200
raw: 0000000000000000 ffff888095e88000 000000010000000b 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff888095e88300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888095e88380: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
>ffff888095e88400: fc fc fc fc fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888095e88480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888095e88500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess), 5 bytes skipped:
0: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx
7: fc ff df
a: 48 c1 e8 03 shr $0x3,%rax
e: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1)
12: 75 31 jne 0x45
14: 48 83 3d 01 31 d8 01 cmpq $0x0,0x1d83101(%rip) # 0x1d8311d
1b: 00
1c: 74 25 je 0x43
1e: fb sti
1f: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
* 25: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2a: e8 26 1b 28 f9 callq 0xf9281b55
2f: 65 8b 05 9f 8d e8 77 mov %gs:0x77e88d9f(%rip),%eax # 0x77e88dd5
36: 85 c0 test %eax,%eax
38: 74 02 je 0x3c
3a: 5d pop %rbp