==================================================================
BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
Read of size 1 at addr ffff888023317818 by task syz-executor/28718
CPU: 0 UID: 0 PID: 28718 Comm: syz-executor Not tainted 6.16.0-rc2-syzkaller-00082-gfb4d33ab452e #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xcd/0x680 mm/kasan/report.c:521
kasan_report+0xe0/0x110 mm/kasan/report.c:634
__kasan_check_byte+0x36/0x50 mm/kasan/common.c:557
kasan_check_byte include/linux/kasan.h:399 [inline]
lock_acquire kernel/locking/lockdep.c:5845 [inline]
lock_acquire+0xfc/0x350 kernel/locking/lockdep.c:5828
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
p9_tag_remove net/9p/client.c:397 [inline]
p9_req_put net/9p/client.c:405 [inline]
p9_req_put+0xaf/0x250 net/9p/client.c:402
req_done+0x1dc/0x2e0 net/9p/trans_virtio.c:147
vring_interrupt drivers/virtio/virtio_ring.c:2715 [inline]
vring_interrupt+0x31e/0x400 drivers/virtio/virtio_ring.c:2690
__handle_irq_event_percpu+0x229/0x7d0 kernel/irq/handle.c:158
handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:210
handle_edge_irq+0x28e/0xab0 kernel/irq/chip.c:789
generic_handle_irq_desc include/linux/irqdesc.h:173 [inline]
handle_irq arch/x86/kernel/irq.c:254 [inline]
call_irq_handler arch/x86/kernel/irq.c:266 [inline]
__common_interrupt+0xdf/0x250 arch/x86/kernel/irq.c:292
common_interrupt+0xba/0xe0 arch/x86/kernel/irq.c:285
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:lock_is_held_type+0x107/0x150 kernel/locking/lockdep.c:5948
Code: 00 00 b8 ff ff ff ff 65 0f c1 05 1c 01 50 08 83 f8 01 75 2d 9c 58 f6 c4 02 75 43 48 f7 04 24 00 02 00 00 74 01 fb 48 83 c4 08 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f e9 87 f1 02 00 45 31 ed eb
RSP: 0018:ffffc900033cf3c0 EFLAGS: 00000296
RAX: 0000000000000046 RBX: ffff8880134e8b68 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffffffff8ddee9f0 RDI: ffffffff8c1563e0
RBP: ffffffff8e5c4700 R08: 0000000000000006 R09: 0000000000001000
R10: 0000000000000000 R11: 0000000000000001 R12: ffff8880134e8000
R13: 0000000000000001 R14: 00000000ffffffff R15: 0000000000000003
lookup_page_ext+0x10d/0x1d0 mm/page_ext.c:254
page_ext_iter_begin include/linux/page_ext.h:132 [inline]
page_table_check_set+0x1e6/0x750 mm/page_table_check.c:113
__page_table_check_ptes_set+0x318/0x420 mm/page_table_check.c:209
page_table_check_ptes_set include/linux/page_table_check.h:76 [inline]
set_ptes include/linux/pgtable.h:292 [inline]
__copy_present_ptes mm/memory.c:973 [inline]
copy_present_ptes+0x1aa1/0x6790 mm/memory.c:1056
copy_pte_range mm/memory.c:1179 [inline]
copy_pmd_range mm/memory.c:1267 [inline]
copy_pud_range mm/memory.c:1304 [inline]
copy_p4d_range mm/memory.c:1328 [inline]
copy_page_range+0x125a/0x5740 mm/memory.c:1416
dup_mmap+0xe88/0x21d0 mm/mmap.c:1838
dup_mm kernel/fork.c:1477 [inline]
copy_mm kernel/fork.c:1529 [inline]
copy_process+0x4081/0x76a0 kernel/fork.c:2169
kernel_clone+0xfc/0x960 kernel/fork.c:2599
__do_compat_sys_ia32_clone+0xcb/0x110 arch/x86/kernel/sys_ia32.c:254
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0x7c/0x3a0 arch/x86/entry/syscall_32.c:306
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:331
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf7fd3579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000ff8252cc EFLAGS: 00000292 ORIG_RAX: 0000000000000078
RAX: ffffffffffffffda RBX: 0000000001200011 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000581e24a8
RBP: 00000000f7462ff4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 2582:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394
kmalloc_noprof include/linux/slab.h:905 [inline]
p9_client_create+0xc7/0x11c0 net/9p/client.c:985
v9fs_session_init+0x1f7/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc5/0xa30 fs/9p/vfs_super.c:122
legacy_get_tree+0x109/0x220 fs/fs_context.c:666
vfs_get_tree+0x8b/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3885 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4209
do_mount fs/namespace.c:4222 [inline]
__do_sys_mount fs/namespace.c:4433 [inline]
__se_sys_mount fs/namespace.c:4410 [inline]
__ia32_sys_mount+0x28b/0x310 fs/namespace.c:4410
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0x7c/0x3a0 arch/x86/entry/syscall_32.c:306
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:331
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Freed by task 2582:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2381 [inline]
slab_free mm/slub.c:4643 [inline]
kfree+0x2b4/0x4d0 mm/slub.c:4842
p9_client_create+0xa28/0x11c0 net/9p/client.c:1064
v9fs_session_init+0x1f7/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc5/0xa30 fs/9p/vfs_super.c:122
legacy_get_tree+0x109/0x220 fs/fs_context.c:666
vfs_get_tree+0x8b/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3885 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4209
do_mount fs/namespace.c:4222 [inline]
__do_sys_mount fs/namespace.c:4433 [inline]
__se_sys_mount fs/namespace.c:4410 [inline]
__ia32_sys_mount+0x28b/0x310 fs/namespace.c:4410
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0x7c/0x3a0 arch/x86/entry/syscall_32.c:306
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:331
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
The buggy address belongs to the object at ffff888023317800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff888023317800, ffff888023317a00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23314
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801b842c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801b842c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea00008cc501 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 6585, tgid 6585 (udevd), ts 149374553518, free_ts 147513358001
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959
alloc_slab_page mm/slub.c:2453 [inline]
allocate_slab mm/slub.c:2619 [inline]
new_slab+0x94/0x330 mm/slub.c:2673
___slab_alloc+0xd9c/0x1940 mm/slub.c:3859
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949
__slab_alloc_node mm/slub.c:4024 [inline]
slab_alloc_node mm/slub.c:4185 [inline]
__do_kmalloc_node mm/slub.c:4327 [inline]
__kmalloc_node_noprof+0x2ed/0x500 mm/slub.c:4334
kmalloc_array_node_noprof include/linux/slab.h:1020 [inline]
alloc_slab_obj_exts+0x41/0xa0 mm/slub.c:1992
account_slab mm/slub.c:2578 [inline]
allocate_slab mm/slub.c:2638 [inline]
new_slab+0x283/0x330 mm/slub.c:2673
___slab_alloc+0xd9c/0x1940 mm/slub.c:3859
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949
__slab_alloc_node mm/slub.c:4024 [inline]
slab_alloc_node mm/slub.c:4185 [inline]
kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4204
sigqueue_alloc kernel/signal.c:455 [inline]
__send_signal_locked+0x159/0x12c0 kernel/signal.c:1087
do_send_sig_info kernel/signal.c:1269 [inline]
group_send_sig_info+0x2a4/0x300 kernel/signal.c:1419
do_bpf_send_signal+0xe1/0x210 kernel/trace/bpf_trace.c:815
irq_work_single+0x1bf/0x260 kernel/irq_work.c:221
page last free pid 8328 tgid 8328 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
__free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706
vfree+0x1fd/0xb50 mm/vmalloc.c:3426
xskq_destroy+0x3b/0x50 net/xdp/xsk_queue.c:64
xsk_release+0x4f0/0x820 net/xdp/xsk.c:1117
__sock_release+0xb0/0x270 net/socket.c:647
sock_close+0x1c/0x30 net/socket.c:1391
__fput+0x3ff/0xb70 fs/file_table.c:465
task_work_run+0x14d/0x240 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xeb/0x110 kernel/entry/common.c:114
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
__do_fast_syscall_32+0x2ac/0x3a0 arch/x86/entry/syscall_32.c:309
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:331
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Memory state around the buggy address:
ffff888023317700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888023317780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888023317800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888023317880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888023317900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: b8 ff ff ff ff mov $0xffffffff,%eax
7: 65 0f c1 05 1c 01 50 xadd %eax,%gs:0x850011c(%rip) # 0x850012b
e: 08
f: 83 f8 01 cmp $0x1,%eax
12: 75 2d jne 0x41
14: 9c pushf
15: 58 pop %rax
16: f6 c4 02 test $0x2,%ah
19: 75 43 jne 0x5e
1b: 48 f7 04 24 00 02 00 testq $0x200,(%rsp)
22: 00
23: 74 01 je 0x26
25: fb sti
26: 48 83 c4 08 add $0x8,%rsp
* 2a: 44 89 e8 mov %r13d,%eax <-- trapping instruction
2d: 5b pop %rbx
2e: 5d pop %rbp
2f: 41 5c pop %r12
31: 41 5d pop %r13
33: 41 5e pop %r14
35: 41 5f pop %r15
37: e9 87 f1 02 00 jmp 0x2f1c3
3c: 45 31 ed xor %r13d,%r13d
3f: eb .byte 0xeb