==================================================================
BUG: KASAN: slab-use-after-free in __lock_acquire+0x2d90/0x3c40 kernel/locking/lockdep.c:5089
Read of size 8 at addr ffff888024a4b418 by task pool_workqueue_/3
CPU: 0 UID: 0 PID: 3 Comm: pool_workqueue_ Not tainted 6.12.0-syzkaller-05480-gfcc79e1714e8 #0
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:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
__lock_acquire+0x2d90/0x3c40 kernel/locking/lockdep.c:5089
lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5849
__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+0x1e7/0x2f0 net/9p/trans_virtio.c:147
vring_interrupt drivers/virtio/virtio_ring.c:2647 [inline]
vring_interrupt+0x31b/0x400 drivers/virtio/virtio_ring.c:2622
__handle_irq_event_percpu+0x229/0x7c0 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:247 [inline]
call_irq_handler arch/x86/kernel/irq.c:259 [inline]
__common_interrupt+0xdf/0x250 arch/x86/kernel/irq.c:285
common_interrupt+0x61/0xe0 arch/x86/kernel/irq.c:278
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:handle_softirqs+0x1da/0x8f0 kernel/softirq.c:540
Code: 89 44 24 18 48 89 6c 24 10 48 c7 c7 20 72 6b 8b e8 7b 05 cd 09 65 66 c7 05 19 88 b3 7e 00 00 e8 4c 96 44 00 fb bb ff ff ff ff <49> c7 c6 c0 b0 c0 8d 41 0f bc dc 83 c3 01 0f 85 a4 00 00 00 e9 b1
RSP: 0018:ffffc90000007f28 EFLAGS: 00000206
RAX: 000000000000f956 RBX: 00000000ffffffff RCX: 1ffffffff207c0b1
RDX: 0000000000000000 RSI: ffffffff8b6cd3c0 RDI: ffffffff8bd16fe0
RBP: ffff88801cedc880 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff903e47d7 R11: 0000000000000000 R12: 0000000000000200
R13: 000000000000000a R14: 0000000000000001 R15: 0000000000000000
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:655
irq_exit_rcu+0x9/0x30 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:preempt_schedule_irq+0x4c/0x90 kernel/sched/core.c:7078
Code: df 55 65 48 8b 2d e4 69 e5 74 53 48 89 eb 48 c1 eb 03 48 01 c3 bf 01 00 00 00 e8 df e9 3d f6 e8 2a 78 76 f6 fb bf 01 00 00 00 ff 9c ff ff 9c 58 fa f6 c4 02 75 1e bf 01 00 00 00 e8 fd 8b 3d
RSP: 0018:ffffc90000357d28 EFLAGS: 00000206
RAX: 000000000000f953 RBX: ffffed10039db910 RCX: 1ffffffff207c0b1
RDX: 0000000000000000 RSI: ffffffff8b6cd3c0 RDI: 0000000000000001
RBP: ffff88801cedc880 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff903e47d7 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
irqentry_exit+0x36/0x90 kernel/entry/common.c:354
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
RIP: 0010:lockdep_unregister_key+0x1b2/0x2b0 kernel/locking/lockdep.c:6593
Code: 54 fd ff ff 48 89 df e8 ec c3 ff ff 89 c3 e8 05 db ff ff 9c 58 f6 c4 02 0f 85 92 00 00 00 41 f7 c5 00 02 00 00 74 01 fb 84 db <75> 4f 5b 5d 41 5c 41 5d 41 5e 41 5f e9 4d 8b 0a 00 48 c7 c0 d4 7a
RSP: 0018:ffffc90000357df0 EFLAGS: 00000246
RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8b6cd680 RDI: ffffffff8bd16fe0
RBP: ffff88804dee5138 R08: ffffffff93585884 R09: 000000000001df82
R10: ffffffff96bbc6df R11: ffff88802b429458 R12: 0000000000000000
R13: 0000000000000246 R14: ffffffff96d6b480 R15: ffff88804dee5140
wq_unregister_lockdep kernel/workqueue.c:4803 [inline]
pwq_release_workfn+0x5e5/0xa50 kernel/workqueue.c:5099
kthread_worker_fn+0x305/0xba0 kernel/kthread.c:844
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Allocated by task 17747:
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:879 [inline]
p9_client_create+0xc8/0x11a0 net/9p/client.c:985
v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc6/0xa30 fs/9p/vfs_super.c:122
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8f/0x380 fs/super.c:1814
do_new_mount fs/namespace.c:3507 [inline]
path_mount+0x6e1/0x1f10 fs/namespace.c:3834
do_mount fs/namespace.c:3847 [inline]
__do_sys_mount fs/namespace.c:4057 [inline]
__se_sys_mount fs/namespace.c:4034 [inline]
__ia32_sys_mount+0x292/0x310 fs/namespace.c:4034
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386
do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Freed by task 17747:
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:579
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:230 [inline]
slab_free_hook mm/slub.c:2342 [inline]
slab_free mm/slub.c:4579 [inline]
kfree+0x14f/0x4b0 mm/slub.c:4727
p9_client_create+0x97d/0x11a0 net/9p/client.c:1064
v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc6/0xa30 fs/9p/vfs_super.c:122
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8f/0x380 fs/super.c:1814
do_new_mount fs/namespace.c:3507 [inline]
path_mount+0x6e1/0x1f10 fs/namespace.c:3834
do_mount fs/namespace.c:3847 [inline]
__do_sys_mount fs/namespace.c:4057 [inline]
__se_sys_mount fs/namespace.c:4034 [inline]
__ia32_sys_mount+0x292/0x310 fs/namespace.c:4034
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386
do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
The buggy address belongs to the object at ffff888024a4b400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff888024a4b400, ffff888024a4b600)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x24a48
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801ac42c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000
head: 00fff00000000040 ffff88801ac42c80 0000000000000000 dead000000000001
head: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000
head: 00fff00000000002 ffffea0000929201 ffffffffffffffff 0000000000000000
head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 17422, tgid 17421 (syz.2.2613), ts 827688407097, free_ts 514994430743
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556
prep_new_page mm/page_alloc.c:1564 [inline]
get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474
__alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4751
alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265
alloc_slab_page mm/slub.c:2412 [inline]
allocate_slab mm/slub.c:2578 [inline]
new_slab+0x2c9/0x410 mm/slub.c:2631
___slab_alloc+0xd1d/0x16f0 mm/slub.c:3818
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3908
__slab_alloc_node mm/slub.c:3961 [inline]
slab_alloc_node mm/slub.c:4122 [inline]
__kmalloc_cache_noprof+0x2c5/0x310 mm/slub.c:4290
kmalloc_noprof include/linux/slab.h:879 [inline]
kzalloc_noprof include/linux/slab.h:1015 [inline]
inetdev_init+0x66/0x5a0 net/ipv4/devinet.c:281
inetdev_event+0xb17/0x16b0 net/ipv4/devinet.c:1598
notifier_call_chain+0xb9/0x410 kernel/notifier.c:93
call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1996
call_netdevice_notifiers_extack net/core/dev.c:2034 [inline]
call_netdevice_notifiers net/core/dev.c:2048 [inline]
register_netdevice+0x1728/0x1e20 net/core/dev.c:10626
register_netdev+0x2f/0x50 net/core/dev.c:10730
ip6gre_init_net+0x260/0x3b0 net/ipv6/ip6_gre.c:1629
ops_init+0x1df/0x5f0 net/core/net_namespace.c:138
page last free pid 12257 tgid 12256 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1127 [inline]
free_unref_page+0x661/0x1080 mm/page_alloc.c:2657
__put_partials+0x14c/0x170 mm/slub.c:3145
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:247 [inline]
slab_post_alloc_hook mm/slub.c:4085 [inline]
slab_alloc_node mm/slub.c:4134 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4141
create_nsproxy kernel/nsproxy.c:56 [inline]
create_new_namespaces+0x30/0xad0 kernel/nsproxy.c:74
prepare_nsset kernel/nsproxy.c:335 [inline]
__do_sys_setns+0x22a/0x1920 kernel/nsproxy.c:569
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386
do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Memory state around the buggy address:
ffff888024a4b300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888024a4b380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888024a4b400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888024a4b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888024a4b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 89 44 24 18 mov %eax,0x18(%rsp)
4: 48 89 6c 24 10 mov %rbp,0x10(%rsp)
9: 48 c7 c7 20 72 6b 8b mov $0xffffffff8b6b7220,%rdi
10: e8 7b 05 cd 09 call 0x9cd0590
15: 65 66 c7 05 19 88 b3 movw $0x0,%gs:0x7eb38819(%rip) # 0x7eb38838
1c: 7e 00 00
1f: e8 4c 96 44 00 call 0x449670
24: fb sti
25: bb ff ff ff ff mov $0xffffffff,%ebx
* 2a: 49 c7 c6 c0 b0 c0 8d mov $0xffffffff8dc0b0c0,%r14 <-- trapping instruction
31: 41 0f bc dc bsf %r12d,%ebx
35: 83 c3 01 add $0x1,%ebx
38: 0f 85 a4 00 00 00 jne 0xe2
3e: e9 .byte 0xe9
3f: b1 .byte 0xb1