==================================================================
BUG: KASAN: slab-use-after-free in __lock_acquire+0x2dfe/0x3ce0 kernel/locking/lockdep.c:5065
Read of size 8 at addr ffff88804c5fb818 by task modprobe/6528
CPU: 3 UID: 0 PID: 6528 Comm: modprobe Not tainted 6.12.0-rc3-syzkaller-00183-g6efbea77b390 #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+0x2dfe/0x3ce0 kernel/locking/lockdep.c:5065
lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
__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+0xba/0xe0 arch/x86/kernel/irq.c:278
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:debug_lockdep_rcu_enabled+0x0/0x40 kernel/rcu/update.c:319
Code: 00 00 00 eb b6 e8 30 fa ff ff eb b6 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1e fa 8b 05 9a f7 3c 05 85 c0 74 20 8b 05 c4 29 3d 05 85 c0
RSP: 0018:ffffc9000dd17600 EFLAGS: 00000246
RAX: ffff88802545380c RBX: ffffc9000dd17740 RCX: 1ffff11004a8a50b
RDX: dffffc0000000000 RSI: 1ffff92001ba2ee8 RDI: 0000000000000005
RBP: ffff888025452800 R08: 0000000000000005 R09: 0000000000000003
R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000003
R13: 0000000000000003 R14: 0000000000000001 R15: ffff888024304c40
mt_slot lib/maple_tree.c:789 [inline]
mas_slot lib/maple_tree.c:822 [inline]
mas_next_node+0x28f/0xf40 lib/maple_tree.c:4615
mas_dfs_postorder lib/maple_tree.c:7076 [inline]
mt_validate+0x2129/0x41b0 lib/maple_tree.c:7607
validate_mm+0xae/0x4d0 mm/vma.c:534
vms_complete_munmap_vmas+0x62c/0x9a0 mm/vma.c:1159
mmap_region+0x4e4/0x2a60 mm/mmap.c:1533
do_mmap+0xc00/0xfc0 mm/mmap.c:496
vm_mmap_pgoff+0x1ba/0x360 mm/util.c:588
ksys_mmap_pgoff+0x32c/0x5c0 mm/mmap.c:542
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:79 [inline]
__x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:79
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f59a28d5b74
Code: 63 08 44 89 e8 5b 41 5c 41 5d c3 41 89 ca 41 f7 c1 ff 0f 00 00 74 0c c7 05 f5 46 01 00 16 00 00 00 eb 17 b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 0c f7 d8 89 05 dc 46 01 00 48 83 c8 ff c3 0f
RSP: 002b:00007fff7b2c5eb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007fff7b2c5ef8 RCX: 00007f59a28d5b74
RDX: 0000000000000005 RSI: 0000000000014000 RDI: 00007f59a260e000
RBP: 00007fff7b2c6290 R08: 0000000000000000 R09: 0000000000007000
R10: 0000000000000812 R11: 0000000000000246 R12: 00007f59a28b32d0
R13: 00007fff7b2c6318 R14: 0000000000006f68 R15: 0000000000000000
Allocated by task 6529:
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:878 [inline]
p9_client_create+0xc8/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:3507 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3834
do_mount fs/namespace.c:3847 [inline]
__do_sys_mount fs/namespace.c:4055 [inline]
__se_sys_mount fs/namespace.c:4032 [inline]
__x64_sys_mount+0x294/0x320 fs/namespace.c:4032
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 6529:
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+0xa58/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:3507 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3834
do_mount fs/namespace.c:3847 [inline]
__do_sys_mount fs/namespace.c:4055 [inline]
__se_sys_mount fs/namespace.c:4032 [inline]
__x64_sys_mount+0x294/0x320 fs/namespace.c:4032
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88804c5fb800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff88804c5fb800, ffff88804c5fba00)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4c5f8
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 ffff88801b042c80 ffffea0000d0d900 dead000000000002
raw: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000
head: 00fff00000000040 ffff88801b042c80 ffffea0000d0d900 dead000000000002
head: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000
head: 00fff00000000002 ffffea0001317e01 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 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 5339, tgid 5339 (syz-executor), ts 64515732891, free_ts 64236380479
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1537
prep_new_page mm/page_alloc.c:1545 [inline]
get_page_from_freelist+0x101e/0x3070 mm/page_alloc.c:3457
__alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4733
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_slab_page mm/slub.c:2414 [inline]
allocate_slab mm/slub.c:2578 [inline]
new_slab+0xca/0x3f0 mm/slub.c:2631
___slab_alloc+0xdac/0x1880 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]
__do_kmalloc_node mm/slub.c:4263 [inline]
__kmalloc_node_noprof+0x357/0x430 mm/slub.c:4270
kmalloc_array_node_noprof include/linux/slab.h:995 [inline]
alloc_slab_obj_exts+0x41/0xa0 mm/slub.c:1968
account_slab mm/slub.c:2541 [inline]
allocate_slab mm/slub.c:2596 [inline]
new_slab+0x305/0x3f0 mm/slub.c:2631
___slab_alloc+0xdac/0x1880 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]
kmem_cache_alloc_noprof+0x2a7/0x2f0 mm/slub.c:4141
__sigqueue_alloc+0x244/0x6b0 kernel/signal.c:428
__send_signal_locked+0x74b/0x11c0 kernel/signal.c:1117
do_send_sig_info kernel/signal.c:1299 [inline]
group_send_sig_info+0x2aa/0x300 kernel/signal.c:1449
bpf_send_signal_common+0x2e8/0x3a0 kernel/trace/bpf_trace.c:857
page last free pid 5776 tgid 5775 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1108 [inline]
free_unref_page+0x5f4/0xdc0 mm/page_alloc.c:2638
__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+0x192/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]
__kmalloc_cache_noprof+0x11e/0x300 mm/slub.c:4290
kmalloc_noprof include/linux/slab.h:878 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
ref_tracker_alloc+0x17c/0x5b0 lib/ref_tracker.c:203
__netns_tracker_alloc include/net/net_namespace.h:331 [inline]
netns_tracker_alloc include/net/net_namespace.h:340 [inline]
get_net_track include/net/net_namespace.h:357 [inline]
sk_alloc+0x206/0xb90 net/core/sock.c:2229
__netlink_create+0x5e/0x2c0 net/netlink/af_netlink.c:646
netlink_create+0x3a4/0x630 net/netlink/af_netlink.c:704
__sock_create+0x32e/0x840 net/socket.c:1576
sock_create net/socket.c:1632 [inline]
__sys_socket_create net/socket.c:1669 [inline]
__sys_socket+0x14f/0x260 net/socket.c:1716
__do_sys_socket net/socket.c:1730 [inline]
__se_sys_socket net/socket.c:1728 [inline]
__x64_sys_socket+0x72/0xb0 net/socket.c:1728
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88804c5fb700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88804c5fb780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88804c5fb800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88804c5fb880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88804c5fb900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 00 00 add %al,(%rax)
2: eb b6 jmp 0xffffffba
4: e8 30 fa ff ff call 0xfffffa39
9: eb b6 jmp 0xffffffc1
b: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
12: 00 00 00
15: 0f 1f 40 00 nopl 0x0(%rax)
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: 90 nop
23: 90 nop
24: 90 nop
25: 90 nop
26: 90 nop
27: 90 nop
28: 90 nop
* 29: f3 0f 1e fa endbr64 <-- trapping instruction
2d: 8b 05 9a f7 3c 05 mov 0x53cf79a(%rip),%eax # 0x53cf7cd
33: 85 c0 test %eax,%eax
35: 74 20 je 0x57
37: 8b 05 c4 29 3d 05 mov 0x53d29c4(%rip),%eax # 0x53d2a01
3d: 85 c0 test %eax,%eax