==================================================================
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 ffff88808dd407b8 by task kworker/u4:7/6831
CPU: 0 PID: 6831 Comm: kworker/u4:7 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
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:ffff888090c8ff10 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9
RAX: 1ffffffff13e3053 RBX: ffff888049e521c0 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff888049e52a44
RBP: ffff8880a5672888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880a88f8200
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
spin_unlock_irq include/linux/spinlock.h:379 [inline]
call_usermodehelper_exec_async+0xa6/0x6a0 kernel/umh.c:74
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Allocated by task 9862:
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_slow+0x18d/0x4a0 fs/namei.c:1655
lookup_one_len+0x163/0x190 fs/namei.c:2544
start_creating+0xc9/0x220 fs/debugfs/inode.c:313
__debugfs_create_file+0x5e/0x480 fs/debugfs/inode.c:352
relay_create_buf_file+0xf0/0x170 kernel/relay.c:429
relay_open_buf.part.0+0x781/0xb80 kernel/relay.c:458
relay_open_buf kernel/relay.c:450 [inline]
relay_open kernel/relay.c:605 [inline]
relay_open+0x537/0x9f0 kernel/relay.c:564
do_blk_trace_setup+0x4f6/0xb40 kernel/trace/blktrace.c:566
__blk_trace_setup+0xca/0x180 kernel/trace/blktrace.c:609
blk_trace_ioctl+0x155/0x290 kernel/trace/blktrace.c:750
blkdev_ioctl+0x112/0x1a80 block/ioctl.c:587
block_ioctl+0xe9/0x130 fs/block_dev.c:1906
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 18:
__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 ffff88808dd40760
which belongs to the cache dentry of size 288
The buggy address is located 88 bytes inside of
288-byte region [ffff88808dd40760, ffff88808dd40880)
The buggy address belongs to the page:
page:ffffea0002375000 count:1 mapcount:0 mapping:ffff88813be45200 index:0x0
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea0002372008 ffffea00023758c8 ffff88813be45200
raw: 0000000000000000 ffff88808dd40080 000000010000000b 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88808dd40680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88808dd40700: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb
>ffff88808dd40780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88808dd40800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88808dd40880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
==================================================================
----------------
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