==================================================================
BUG: KASAN: slab-use-after-free in __lock_acquire+0x4208/0x5de0 kernel/locking/lockdep.c:5012
Read of size 8 at addr ffff888024775418 by task syz-executor.3/5197
CPU: 1 PID: 5197 Comm: syz-executor.3 Not tainted 6.5.0-rc5-syzkaller-00182-g25aa0bebba72 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:475
kasan_report+0xda/0x110 mm/kasan/report.c:588
__lock_acquire+0x4208/0x5de0 kernel/locking/lockdep.c:5012
lock_acquire kernel/locking/lockdep.c:5761 [inline]
lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5726
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:162
p9_tag_remove net/9p/client.c:394 [inline]
p9_req_put net/9p/client.c:402 [inline]
p9_req_put+0xc6/0x250 net/9p/client.c:399
req_done+0x1e7/0x2e0 net/9p/trans_virtio.c:147
vring_interrupt drivers/virtio/virtio_ring.c:2501 [inline]
vring_interrupt+0x317/0x3f0 drivers/virtio/virtio_ring.c:2476
__handle_irq_event_percpu+0x22a/0x740 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+0x261/0xcf0 kernel/irq/chip.c:834
generic_handle_irq_desc include/linux/irqdesc.h:161 [inline]
handle_irq arch/x86/kernel/irq.c:238 [inline]
__common_interrupt+0x9f/0x220 arch/x86/kernel/irq.c:257
common_interrupt+0xa9/0xd0 arch/x86/kernel/irq.c:247
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:636
RIP: 0010:lock_acquire+0x1ef/0x510 kernel/locking/lockdep.c:5729
Code: c1 05 d5 6e 9b 7e 83 f8 01 0f 85 b0 02 00 00 9c 58 f6 c4 02 0f 85 9b 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: 0018:ffffc90004497518 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff92000892ea5 RCX: 0000000000000001
RDX: 1ffff11003e34a58 RSI: ffffffff8a6c83a0 RDI: ffffffff8ac811a0
RBP: 0000000000000200 R08: 0000000000000000 R09: fffffbfff2309dd0
R10: ffffffff9184ee87 R11: 000000000009401a R12: 0000000000000000
R13: 0000000000000000 R14: ffffffff8c9a72c0 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:303 [inline]
rcu_read_lock include/linux/rcupdate.h:749 [inline]
page_ext_get+0x3c/0x310 mm/page_ext.c:167
page_table_check_set.part.0+0x3a/0x810 mm/page_table_check.c:111
page_table_check_set mm/page_table_check.c:201 [inline]
__page_table_check_pte_set+0x297/0x2f0 mm/page_table_check.c:201
page_table_check_pte_set include/linux/page_table_check.h:83 [inline]
set_pte_at arch/x86/include/asm/pgtable.h:1026 [inline]
copy_present_pte mm/memory.c:978 [inline]
copy_pte_range mm/memory.c:1082 [inline]
copy_pmd_range mm/memory.c:1167 [inline]
copy_pud_range mm/memory.c:1204 [inline]
copy_p4d_range mm/memory.c:1228 [inline]
copy_page_range+0x1590/0x3dd0 mm/memory.c:1326
dup_mmap+0x1376/0x1c70 kernel/fork.c:758
dup_mm kernel/fork.c:1689 [inline]
copy_mm kernel/fork.c:1738 [inline]
copy_process+0x6c11/0x7400 kernel/fork.c:2504
kernel_clone+0xfd/0x8f0 kernel/fork.c:2912
__do_compat_sys_ia32_clone+0xa1/0xe0 arch/x86/kernel/sys_ia32.c:254
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
RIP: 0023:0xf7f8b579
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:00000000ffa5977c EFLAGS: 00000292 ORIG_RAX: 0000000000000078
RAX: ffffffffffffffda RBX: 0000000001200011 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000057c7e468
RBP: 00000000f7353ff4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 6813:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383
kmalloc include/linux/slab.h:582 [inline]
p9_client_create+0xcf/0x1210 net/9p/client.c:978
v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc6/0xcd0 fs/9p/vfs_super.c:123
legacy_get_tree+0x109/0x220 fs/fs_context.c:611
vfs_get_tree+0x88/0x350 fs/super.c:1519
do_new_mount fs/namespace.c:3335 [inline]
path_mount+0x1492/0x1ed0 fs/namespace.c:3662
do_mount fs/namespace.c:3675 [inline]
__do_sys_mount fs/namespace.c:3884 [inline]
__se_sys_mount fs/namespace.c:3861 [inline]
__ia32_sys_mount+0x291/0x310 fs/namespace.c:3861
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
Freed by task 6813:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x15e/0x1b0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:162 [inline]
slab_free_hook mm/slub.c:1792 [inline]
slab_free_freelist_hook+0x10b/0x1e0 mm/slub.c:1818
slab_free mm/slub.c:3801 [inline]
__kmem_cache_free+0xb8/0x2f0 mm/slub.c:3814
p9_client_create+0xa14/0x1210 net/9p/client.c:1049
v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc6/0xcd0 fs/9p/vfs_super.c:123
legacy_get_tree+0x109/0x220 fs/fs_context.c:611
vfs_get_tree+0x88/0x350 fs/super.c:1519
do_new_mount fs/namespace.c:3335 [inline]
path_mount+0x1492/0x1ed0 fs/namespace.c:3662
do_mount fs/namespace.c:3675 [inline]
__do_sys_mount fs/namespace.c:3884 [inline]
__se_sys_mount fs/namespace.c:3861 [inline]
__ia32_sys_mount+0x291/0x310 fs/namespace.c:3861
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
Last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
insert_work+0x4a/0x330 kernel/workqueue.c:1556
__queue_work+0x5f5/0x1040 kernel/workqueue.c:1717
call_timer_fn+0x1a0/0x580 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1746 [inline]
__run_timers+0x585/0xb10 kernel/time/timer.c:2022
run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035
__do_softirq+0x218/0x965 kernel/softirq.c:553
Second to last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
insert_work+0x4a/0x330 kernel/workqueue.c:1556
__queue_work+0x5f5/0x1040 kernel/workqueue.c:1717
call_timer_fn+0x1a0/0x580 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1746 [inline]
__run_timers+0x585/0xb10 kernel/time/timer.c:2022
run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035
__do_softirq+0x218/0x965 kernel/softirq.c:553
The buggy address belongs to the object at ffff888024775400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff888024775400, ffff888024775600)
The buggy address belongs to the physical page:
page:ffffea000091dd00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888024776c00 pfn:0x24774
head:ffffea000091dd00 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000010200 ffff888012842c80 0000000000000000 dead000000000001
raw: ffff888024776c00 000000008010000f 00000001ffffffff 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5256, tgid 5256 (syz-executor.1), ts 152161732604, free_ts 151923582717
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570
prep_new_page mm/page_alloc.c:1577 [inline]
get_page_from_freelist+0x10a9/0x31e0 mm/page_alloc.c:3221
__alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4477
__alloc_pages_node include/linux/gfp.h:237 [inline]
alloc_slab_page mm/slub.c:1864 [inline]
allocate_slab+0xa1/0x380 mm/slub.c:2009
new_slab mm/slub.c:2062 [inline]
___slab_alloc+0x8bc/0x1570 mm/slub.c:3215
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3314
__slab_alloc_node mm/slub.c:3367 [inline]
slab_alloc_node mm/slub.c:3460 [inline]
__kmem_cache_alloc_node+0x137/0x350 mm/slub.c:3509
__do_kmalloc_node mm/slab_common.c:984 [inline]
__kmalloc_node+0x4f/0x100 mm/slab_common.c:992
kmalloc_array_node include/linux/slab.h:680 [inline]
kcalloc_node include/linux/slab.h:685 [inline]
memcg_alloc_slab_cgroups+0xa9/0x170 mm/memcontrol.c:2899
memcg_slab_post_alloc_hook+0xaa/0x390 mm/slab.h:530
slab_post_alloc_hook mm/slab.h:770 [inline]
slab_alloc_node mm/slub.c:3470 [inline]
slab_alloc mm/slub.c:3478 [inline]
__kmem_cache_alloc_lru mm/slub.c:3485 [inline]
kmem_cache_alloc+0x1a7/0x3b0 mm/slub.c:3494
anon_vma_chain_alloc mm/rmap.c:142 [inline]
__anon_vma_prepare+0x64/0x550 mm/rmap.c:196
anon_vma_prepare include/linux/rmap.h:159 [inline]
do_anonymous_page mm/memory.c:4102 [inline]
do_pte_missing mm/memory.c:3662 [inline]
handle_pte_fault mm/memory.c:4939 [inline]
__handle_mm_fault+0x39a1/0x3b80 mm/memory.c:5079
handle_mm_fault+0x2ab/0x9d0 mm/memory.c:5233
do_user_addr_fault+0x446/0xfc0 arch/x86/mm/fault.c:1392
handle_page_fault arch/x86/mm/fault.c:1486 [inline]
exc_page_fault+0x5c/0xd0 arch/x86/mm/fault.c:1542
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1161 [inline]
free_unref_page_prepare+0x508/0xb90 mm/page_alloc.c:2348
free_unref_page+0x33/0x3b0 mm/page_alloc.c:2443
__stack_depot_save+0x193/0x510 lib/stackdepot.c:443
kasan_save_stack+0x43/0x50 mm/kasan/common.c:46
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
__kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:186 [inline]
slab_post_alloc_hook mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3470 [inline]
slab_alloc mm/slub.c:3478 [inline]
__kmem_cache_alloc_lru mm/slub.c:3485 [inline]
kmem_cache_alloc+0x172/0x3b0 mm/slub.c:3494
__es_alloc_extent fs/ext4/extents_status.c:467 [inline]
__es_alloc_extent fs/ext4/extents_status.c:464 [inline]
__es_insert_extent+0x741/0x1470 fs/ext4/extents_status.c:815
ext4_es_cache_extent+0x304/0x4c0 fs/ext4/extents_status.c:937
ext4_cache_extents+0x13e/0x2d0 fs/ext4/extents.c:541
ext4_find_extent+0xa90/0xce0 fs/ext4/extents.c:925
ext4_ext_map_blocks+0x26b/0x5b00 fs/ext4/extents.c:4101
ext4_map_blocks+0x844/0x1770 fs/ext4/inode.c:548
ext4_getblk+0x5e0/0x810 fs/ext4/inode.c:819
ext4_bread_batch+0x94/0x510 fs/ext4/inode.c:896
__ext4_find_entry+0x4c2/0x1050 fs/ext4/namei.c:1666
Memory state around the buggy address:
ffff888024775300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888024775380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888024775400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888024775480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888024775500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: c1 05 d5 6e 9b 7e 83 roll $0x83,0x7e9b6ed5(%rip) # 0x7e9b6edc
7: f8 clc
8: 01 0f add %ecx,(%rdi)
a: 85 b0 02 00 00 9c test %esi,-0x63fffffe(%rax)
10: 58 pop %rax
11: f6 c4 02 test $0x2,%ah
14: 0f 85 9b 02 00 00 jne 0x2b5
1a: 48 85 ed test %rbp,%rbp
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