==================================================================
BUG: KASAN: slab-use-after-free in __lock_acquire+0x2de0/0x3cb0 kernel/locking/lockdep.c:5007
Read of size 8 at addr ffff888061e6d818 by task syz-executor/10357
CPU: 0 UID: 0 PID: 10357 Comm: syz-executor Not tainted 6.11.0-rc7-syzkaller-00020-g8d8d276ba2fb #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:93 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119
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+0x2de0/0x3cb0 kernel/locking/lockdep.c:5007
lock_acquire kernel/locking/lockdep.c:5759 [inline]
lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724
__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:2595 [inline]
vring_interrupt+0x31b/0x400 drivers/virtio/virtio_ring.c:2570
__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+0xab/0xd0 arch/x86/kernel/irq.c:278
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:lock_acquire+0x1f2/0x560 kernel/locking/lockdep.c:5727
Code: c1 05 5a 37 99 7e 83 f8 01 0f 85 ea 02 00 00 9c 58 f6 c4 02 0f 85 d5 02 00 00 48 85 ed 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24
RSP: 0000:ffffc90027f178c8 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff92004fe2f1b RCX: 0000000000000001
RDX: 0000000000000001 RSI: ffffffff8b4cd360 RDI: ffffffff8bb08060
RBP: 0000000000000200 R08: 0000000000000000 R09: fffffbfff2d126e0
R10: ffffffff96893707 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffffffff8ddb94a0 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
rcu_read_lock include/linux/rcupdate.h:838 [inline]
page_ext_get+0x3a/0x310 mm/page_ext.c:525
page_table_check_set mm/page_table_check.c:114 [inline]
page_table_check_set+0x285/0x9d0 mm/page_table_check.c:102
__page_table_check_ptes_set+0x2d0/0x3e0 mm/page_table_check.c:225
page_table_check_ptes_set include/linux/page_table_check.h:74 [inline]
set_ptes include/linux/pgtable.h:267 [inline]
set_pte_range+0x30e/0x520 mm/memory.c:4806
filemap_map_order0_folio mm/filemap.c:3594 [inline]
filemap_map_pages+0x50e/0x1440 mm/filemap.c:3644
do_fault_around mm/memory.c:5019 [inline]
do_read_fault mm/memory.c:5052 [inline]
do_fault mm/memory.c:5191 [inline]
do_pte_missing mm/memory.c:3947 [inline]
handle_pte_fault mm/memory.c:5521 [inline]
__handle_mm_fault+0x39de/0x5400 mm/memory.c:5664
handle_mm_fault+0x498/0xa60 mm/memory.c:5832
do_user_addr_fault+0x60d/0x13f0 arch/x86/mm/fault.c:1338
handle_page_fault arch/x86/mm/fault.c:1481 [inline]
exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0023:0xf71e76d0
Code: 77 ff ff 83 c4 10 eb d3 66 90 83 ec 0c 8d 83 24 d5 b6 00 50 e8 e1 77 ff ff 83 c4 10 eb d4 8d b4 26 00 00 00 00 8d 74 26 00 90 a4 1b ef ff 81 c2 1f 49 1d 00 80 ba 20 d5 b6 00 00 74 7c c7 c0
RSP: 002b:00000000ffba031c EFLAGS: 00010282
RAX: 00000000f7f294c0 RBX: 00000000f73bbff4 RCX: 00000000f71e76d0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00000000f73bbff4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 10356:
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:370 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387
kmalloc_noprof include/linux/slab.h:681 [inline]
p9_client_create+0xcf/0x11b0 net/9p/client.c:983
v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc6/0xa50 fs/9p/vfs_super.c:122
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8f/0x380 fs/super.c:1800
do_new_mount fs/namespace.c:3472 [inline]
path_mount+0x6e1/0x1f10 fs/namespace.c:3799
do_mount fs/namespace.c:3812 [inline]
__do_sys_mount fs/namespace.c:4020 [inline]
__se_sys_mount fs/namespace.c:3997 [inline]
__ia32_sys_mount+0x292/0x310 fs/namespace.c:3997
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 10356:
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+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2256 [inline]
slab_free mm/slub.c:4477 [inline]
kfree+0x12a/0x3b0 mm/slub.c:4598
p9_client_create+0x9ca/0x11b0 net/9p/client.c:1054
v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc6/0xa50 fs/9p/vfs_super.c:122
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8f/0x380 fs/super.c:1800
do_new_mount fs/namespace.c:3472 [inline]
path_mount+0x6e1/0x1f10 fs/namespace.c:3799
do_mount fs/namespace.c:3812 [inline]
__do_sys_mount fs/namespace.c:4020 [inline]
__se_sys_mount fs/namespace.c:3997 [inline]
__ia32_sys_mount+0x292/0x310 fs/namespace.c:3997
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 ffff888061e6d800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff888061e6d800, ffff888061e6da00)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x61e6c
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff)
page_type: 0xfdffffff(slab)
raw: 04fff00000000040 ffff88801ac42c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080100010 00000001fdffffff 0000000000000000
head: 04fff00000000040 ffff88801ac42c80 0000000000000000 dead000000000001
head: 0000000000000000 0000000080100010 00000001fdffffff 0000000000000000
head: 04fff00000000002 ffffea0001879b01 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 5358, tgid 5358 (syz-executor), ts 104418445062, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500
prep_new_page mm/page_alloc.c:1508 [inline]
get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x4e/0xf0 mm/slub.c:2325
allocate_slab mm/slub.c:2488 [inline]
new_slab+0x84/0x260 mm/slub.c:2541
___slab_alloc+0xdac/0x1870 mm/slub.c:3727
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3817
__slab_alloc_node mm/slub.c:3870 [inline]
slab_alloc_node mm/slub.c:4029 [inline]
__do_kmalloc_node mm/slub.c:4161 [inline]
__kmalloc_noprof+0x379/0x410 mm/slub.c:4174
kmalloc_noprof include/linux/slab.h:685 [inline]
kzalloc_noprof include/linux/slab.h:807 [inline]
fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x337/0x1aa0 net/ipv6/route.c:3761
ip6_route_add+0x26/0x1c0 net/ipv6/route.c:3853
addrconf_add_mroute+0x1de/0x350 net/ipv6/addrconf.c:2550
addrconf_add_dev+0x14e/0x1c0 net/ipv6/addrconf.c:2568
inet6_addr_add+0x1a8/0xbc0 net/ipv6/addrconf.c:3024
inet6_rtm_newaddr+0x11d4/0x1aa0 net/ipv6/addrconf.c:5048
rtnetlink_rcv_msg+0x3c7/0xea0 net/core/rtnetlink.c:6647
page_owner free stack trace missing
Memory state around the buggy address:
ffff888061e6d700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888061e6d780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888061e6d800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888061e6d880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888061e6d900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: c1 05 5a 37 99 7e 83 roll $0x83,0x7e99375a(%rip) # 0x7e993761
7: f8 clc
8: 01 0f add %ecx,(%rdi)
a: 85 ea test %ebp,%edx
c: 02 00 add (%rax),%al
e: 00 9c 58 f6 c4 02 0f add %bl,0xf02c4f6(%rax,%rbx,2)
15: 85 d5 test %edx,%ebp
17: 02 00 add (%rax),%al
19: 00 48 85 add %cl,-0x7b(%rax)
1c: ed in (%dx),%eax
1d: 74 01 je 0x20
1f: fb sti
20: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
27: fc ff df
* 2a: 48 01 c3 add %rax,%rbx <-- trapping instruction
2d: 48 c7 03 00 00 00 00 movq $0x0,(%rbx)
34: 48 c7 43 08 00 00 00 movq $0x0,0x8(%rbx)
3b: 00
3c: 48 rex.W
3d: 8b .byte 0x8b
3e: 84 .byte 0x84
3f: 24 .byte 0x24