==================================================================
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 ffff88803c936818 by task kworker/u32:18/6252
CPU: 3 UID: 0 PID: 6252 Comm: kworker/u32:18 Not tainted 6.15.0-rc6-syzkaller-00025-g627277ba7c23 #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
Workqueue: events_unbound toggle_allocation_gate
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+0xc3/0x670 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:5840 [inline]
lock_acquire+0xfc/0x350 kernel/locking/lockdep.c:5823
__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+0x22c/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+0x263/0xd10 kernel/irq/chip.c:831
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+0xe2/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:csd_lock_wait kernel/smp.c:340 [inline]
RIP: 0010:smp_call_function_many_cond+0x4ba/0x1290 kernel/smp.c:885
Code: 07 49 c1 ec 03 48 89 c5 4d 01 f4 83 c5 03 e8 5d 17 0c 00 f3 90 41 0f b6 04 24 40 38 c5 7c 08 84 c0 0f 85 de 0b 00 00 8b 43 08 <31> ff 83 e0 01 41 89 c5 89 c6 e8 77 12 0c 00 45 85 ed 75 d0 e8 2d
RSP: 0018:ffffc90005bdf938 EFLAGS: 00000246
RAX: 0000000000000011 RBX: ffff88806a4415e0 RCX: ffffffff81af2ee9
RDX: ffff888026770000 RSI: ffffffff81af2ec3 RDI: 0000000000000005
RBP: 0000000000000003 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffed100d4882bd
R13: 0000000000000001 R14: dffffc0000000000 R15: ffff88806a73b040
on_each_cpu_cond_mask+0x40/0x90 kernel/smp.c:1052
on_each_cpu include/linux/smp.h:71 [inline]
text_poke_sync arch/x86/kernel/alternative.c:2751 [inline]
text_poke_bp_batch+0x657/0x760 arch/x86/kernel/alternative.c:2961
text_poke_flush arch/x86/kernel/alternative.c:3152 [inline]
text_poke_flush arch/x86/kernel/alternative.c:3149 [inline]
text_poke_finish+0x30/0x40 arch/x86/kernel/alternative.c:3159
arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146
jump_label_update+0x376/0x550 kernel/jump_label.c:919
static_key_disable_cpuslocked+0x158/0x1c0 kernel/jump_label.c:240
static_key_disable+0x1a/0x20 kernel/jump_label.c:248
toggle_allocation_gate mm/kfence/core.c:855 [inline]
toggle_allocation_gate+0x145/0x280 mm/kfence/core.c:842
process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3319 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400
kthread+0x3c2/0x780 kernel/kthread.c:464
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 6592:
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+0x10c/0x220 fs/fs_context.c:662
vfs_get_tree+0x8b/0x340 fs/super.c:1759
do_new_mount fs/namespace.c:3881 [inline]
path_mount+0x14d4/0x1f20 fs/namespace.c:4208
do_mount fs/namespace.c:4221 [inline]
__do_sys_mount fs/namespace.c:4432 [inline]
__se_sys_mount fs/namespace.c:4409 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4409
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 6592:
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:2380 [inline]
slab_free mm/slub.c:4642 [inline]
kfree+0x2b6/0x4d0 mm/slub.c:4841
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+0x10c/0x220 fs/fs_context.c:662
vfs_get_tree+0x8b/0x340 fs/super.c:1759
do_new_mount fs/namespace.c:3881 [inline]
path_mount+0x14d4/0x1f20 fs/namespace.c:4208
do_mount fs/namespace.c:4221 [inline]
__do_sys_mount fs/namespace.c:4432 [inline]
__se_sys_mount fs/namespace.c:4409 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4409
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88803c936800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff88803c936800, ffff88803c936a00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3c934
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 ffff88801b442c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801b442c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000f24d01 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 24, tgid 24 (kworker/2:0), ts 130610559026, free_ts 130608912956
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718
prep_new_page mm/page_alloc.c:1726 [inline]
get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688
__alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2301
alloc_slab_page mm/slub.c:2450 [inline]
allocate_slab mm/slub.c:2618 [inline]
new_slab+0x244/0x340 mm/slub.c:2672
___slab_alloc+0xd9c/0x1940 mm/slub.c:3858
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3948
__slab_alloc_node mm/slub.c:4023 [inline]
slab_alloc_node mm/slub.c:4184 [inline]
__kmalloc_cache_noprof+0xfb/0x3e0 mm/slub.c:4353
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
br_multicast_new_port_group+0x138/0xb00 net/bridge/br_multicast.c:1419
__br_multicast_add_group+0x401/0x640 net/bridge/br_multicast.c:1538
br_multicast_add_group net/bridge/br_multicast.c:1569 [inline]
br_ip6_multicast_add_group+0x289/0x330 net/bridge/br_multicast.c:1621
br_ip6_multicast_mld2_report net/bridge/br_multicast.c:2976 [inline]
br_multicast_ipv6_rcv net/bridge/br_multicast.c:3914 [inline]
br_multicast_rcv+0xd50/0x6a50 net/bridge/br_multicast.c:3972
br_handle_frame_finish+0x107c/0x1c20 net/bridge/br_input.c:156
br_nf_hook_thresh+0x301/0x410 net/bridge/br_netfilter_hooks.c:1170
br_nf_pre_routing_finish_ipv6+0x76a/0xfb0 net/bridge/br_netfilter_ipv6.c:154
NF_HOOK include/linux/netfilter.h:314 [inline]
br_nf_pre_routing_ipv6+0x3cd/0x8c0 net/bridge/br_netfilter_ipv6.c:184
page last free pid 5958 tgid 5958 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1262 [inline]
__free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4147 [inline]
slab_alloc_node mm/slub.c:4196 [inline]
__kmalloc_cache_noprof+0x1f1/0x3e0 mm/slub.c:4353
kmalloc_noprof include/linux/slab.h:905 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:664 [inline]
netdevice_event+0x365/0x9d0 drivers/infiniband/core/roce_gid_mgmt.c:823
notifier_call_chain+0xbc/0x410 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2176
call_netdevice_notifiers_extack net/core/dev.c:2214 [inline]
call_netdevice_notifiers net/core/dev.c:2228 [inline]
__dev_notify_flags+0x12c/0x2e0 net/core/dev.c:9393
netif_change_flags+0x108/0x160 net/core/dev.c:9422
do_setlink.constprop.0+0xddf/0x44b0 net/core/rtnetlink.c:3152
rtnl_changelink net/core/rtnetlink.c:3769 [inline]
__rtnl_newlink net/core/rtnetlink.c:3928 [inline]
rtnl_newlink+0x1446/0x2000 net/core/rtnetlink.c:4065
rtnetlink_rcv_msg+0x95b/0xe90 net/core/rtnetlink.c:6955
netlink_rcv_skb+0x16a/0x440 net/netlink/af_netlink.c:2534
netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]
netlink_unicast+0x53d/0x7f0 net/netlink/af_netlink.c:1339
netlink_sendmsg+0x8d1/0xdd0 net/netlink/af_netlink.c:1883
Memory state around the buggy address:
ffff88803c936700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88803c936780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88803c936800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88803c936880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88803c936900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 49 c1 ec 03 shr $0x3,%r12
4: 48 89 c5 mov %rax,%rbp
7: 4d 01 f4 add %r14,%r12
a: 83 c5 03 add $0x3,%ebp
d: e8 5d 17 0c 00 call 0xc176f
12: f3 90 pause
14: 41 0f b6 04 24 movzbl (%r12),%eax
19: 40 38 c5 cmp %al,%bpl
1c: 7c 08 jl 0x26
1e: 84 c0 test %al,%al
20: 0f 85 de 0b 00 00 jne 0xc04
26: 8b 43 08 mov 0x8(%rbx),%eax
* 29: 31 ff xor %edi,%edi <-- trapping instruction
2b: 83 e0 01 and $0x1,%eax
2e: 41 89 c5 mov %eax,%r13d
31: 89 c6 mov %eax,%esi
33: e8 77 12 0c 00 call 0xc12af
38: 45 85 ed test %r13d,%r13d
3b: 75 d0 jne 0xd
3d: e8 .byte 0xe8
3e: 2d .byte 0x2d