==================================================================
BUG: KASAN: slab-use-after-free in __lock_acquire+0x11c/0x7f70 kernel/locking/lockdep.c:5012
Read of size 8 at addr ffff8880292e0a00 by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.5.0-rc4-syzkaller-00245-gf6a691685962 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0x163/0x540 mm/kasan/report.c:475
kasan_report+0x175/0x1b0 mm/kasan/report.c:588
__lock_acquire+0x11c/0x7f70 kernel/locking/lockdep.c:5012
lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5761
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
try_to_wake_up+0xb2/0x1160 kernel/sched/core.c:4229
call_timer_fn+0x178/0x580 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x64f/0x860 kernel/time/timer.c:2022
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035
__do_softirq+0x2ab/0x908 kernel/softirq.c:553
invoke_softirq kernel/softirq.c:427 [inline]
__irq_exit_rcu+0xf1/0x1b0 kernel/softirq.c:632
irq_exit_rcu+0x9/0x20 kernel/softirq.c:644
sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1109
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:37 [inline]
RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:72 [inline]
RIP: 0010:acpi_safe_halt+0x20/0x30 drivers/acpi/processor_idle.c:113
Code: 7f 04 eb 36 66 0f 1f 44 00 00 65 48 8b 05 d8 13 47 75 48 f7 00 08 00 00 00 75 10 66 90 0f 00 2d 46 75 a5 00 f3 0f 1e fa fb f4 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 89 fa ec 48 8b 05
RSP: 0018:ffffffff8d007ca8 EFLAGS: 00000246
RAX: ffffffff8d0944c0 RBX: ffff888014667864 RCX: 0000000000011c49
RDX: 0000000000000001 RSI: ffff888014667800 RDI: ffff888014667864
RBP: 0000000000038a68 R08: ffff8880b9836a8b R09: 1ffff11017306d51
R10: dffffc0000000000 R11: ffffed1017306d52 R12: ffff888140a8b000
R13: 0000000000000000 R14: 0000000000000001 R15: ffffffff8da118a0
acpi_idle_enter+0xe4/0x140 drivers/acpi/processor_idle.c:707
cpuidle_enter_state+0x10e/0x470 drivers/cpuidle/cpuidle.c:267
cpuidle_enter+0x5d/0x90 drivers/cpuidle/cpuidle.c:388
call_cpuidle kernel/sched/idle.c:134 [inline]
cpuidle_idle_call kernel/sched/idle.c:215 [inline]
do_idle+0x374/0x5c0 kernel/sched/idle.c:282
cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:379
rest_init+0x295/0x2b0 init/main.c:726
arch_call_rest_init+0xe/0x10 init/main.c:823
start_kernel+0x46e/0x4f0 init/main.c:1068
x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:556
x86_64_start_kernel+0x99/0xa0 arch/x86/kernel/head64.c:537
secondary_startup_64_no_verify+0x168/0x16b
Allocated by task 2:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4f/0x70 mm/kasan/common.c:52
__kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:186 [inline]
slab_post_alloc_hook+0x6c/0x3b0 mm/slab.h:762
slab_alloc_node mm/slub.c:3470 [inline]
kmem_cache_alloc_node+0x149/0x330 mm/slub.c:3515
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct+0x57/0x7d0 kernel/fork.c:1105
copy_process+0x5c8/0x4290 kernel/fork.c:2330
kernel_clone+0x222/0x800 kernel/fork.c:2912
kernel_thread+0x1bc/0x230 kernel/fork.c:2974
create_kthread kernel/kthread.c:412 [inline]
kthreadd+0x600/0x820 kernel/kthread.c:747
ret_from_fork+0x2e/0x60 arch/x86/kernel/process.c:145
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Freed by task 0:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4f/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522
____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:162 [inline]
slab_free_hook mm/slub.c:1792 [inline]
slab_free_freelist_hook mm/slub.c:1818 [inline]
slab_free mm/slub.c:3801 [inline]
kmem_cache_free+0x292/0x500 mm/slub.c:3823
rcu_do_batch kernel/rcu/tree.c:2135 [inline]
rcu_core+0xaaa/0x1740 kernel/rcu/tree.c:2399
__do_softirq+0x2ab/0x908 kernel/softirq.c:553
Last potentially related work creation:
kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492
__call_rcu_common kernel/rcu/tree.c:2649 [inline]
call_rcu+0x167/0xa70 kernel/rcu/tree.c:2763
context_switch kernel/sched/core.c:5384 [inline]
__schedule+0x187b/0x48f0 kernel/sched/core.c:6710
schedule_idle+0x52/0x90 kernel/sched/core.c:6814
do_idle+0x565/0x5c0 kernel/sched/idle.c:310
cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:379
start_secondary+0xee/0xf0 arch/x86/kernel/smpboot.c:326
secondary_startup_64_no_verify+0x168/0x16b
Second to last potentially related work creation:
kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492
__call_rcu_common kernel/rcu/tree.c:2649 [inline]
call_rcu+0x167/0xa70 kernel/rcu/tree.c:2763
put_task_struct_rcu_user kernel/exit.c:232 [inline]
release_task+0x15ad/0x16f0 kernel/exit.c:282
wait_task_zombie kernel/exit.c:1210 [inline]
wait_consider_task+0x1a43/0x2e20 kernel/exit.c:1437
do_wait_thread kernel/exit.c:1500 [inline]
do_wait+0x312/0xb00 kernel/exit.c:1617
kernel_wait4+0x2a2/0x3e0 kernel/exit.c:1780
__do_sys_wait4 kernel/exit.c:1808 [inline]
__se_sys_wait4 kernel/exit.c:1804 [inline]
__x64_sys_wait4+0x134/0x1e0 kernel/exit.c:1804
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
The buggy address belongs to the object at ffff8880292e0000
which belongs to the cache task_struct of size 7360
The buggy address is located 2560 bytes inside of
freed 7360-byte region [ffff8880292e0000, ffff8880292e1cc0)
The buggy address belongs to the physical page:
page:ffffea0000a4b800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x292e0
head:ffffea0000a4b800 order:3 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 ffff888014674500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080040004 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 42, tgid 42 (kworker/u4:3), ts 11105890887, free_ts 0
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1570
prep_new_page mm/page_alloc.c:1577 [inline]
get_page_from_freelist+0x31e8/0x3370 mm/page_alloc.c:3221
__alloc_pages+0x255/0x670 mm/page_alloc.c:4477
alloc_slab_page+0x6a/0x160 mm/slub.c:1862
allocate_slab mm/slub.c:2009 [inline]
new_slab+0x84/0x2f0 mm/slub.c:2062
___slab_alloc+0xade/0x1100 mm/slub.c:3215
__slab_alloc mm/slub.c:3314 [inline]
__slab_alloc_node mm/slub.c:3367 [inline]
slab_alloc_node mm/slub.c:3460 [inline]
kmem_cache_alloc_node+0x1e2/0x330 mm/slub.c:3515
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct+0x57/0x7d0 kernel/fork.c:1105
copy_process+0x5c8/0x4290 kernel/fork.c:2330
kernel_clone+0x222/0x800 kernel/fork.c:2912
user_mode_thread+0x132/0x190 kernel/fork.c:2990
call_usermodehelper_exec_work+0x5c/0x220 kernel/umh.c:172
process_one_work+0x92c/0x12c0 kernel/workqueue.c:2597
worker_thread+0xa63/0x1210 kernel/workqueue.c:2748
kthread+0x2b8/0x350 kernel/kthread.c:389
ret_from_fork+0x2e/0x60 arch/x86/kernel/process.c:145
page_owner free stack trace missing
Memory state around the buggy address:
ffff8880292e0900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880292e0980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880292e0a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880292e0a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880292e0b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 7f 04 jg 0x6
2: eb 36 jmp 0x3a
4: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
a: 65 48 8b 05 d8 13 47 mov %gs:0x754713d8(%rip),%rax # 0x754713ea
11: 75
12: 48 f7 00 08 00 00 00 testq $0x8,(%rax)
19: 75 10 jne 0x2b
1b: 66 90 xchg %ax,%ax
1d: 0f 00 2d 46 75 a5 00 verw 0xa57546(%rip) # 0xa5756a
24: f3 0f 1e fa endbr64
28: fb sti
29: f4 hlt
* 2a: fa cli <-- trapping instruction
2b: c3 ret
2c: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
33: 00 00 00
36: 0f 1f 40 00 nopl 0x0(%rax)
3a: 89 fa mov %edi,%edx
3c: ec in (%dx),%al
3d: 48 rex.W
3e: 8b .byte 0x8b
3f: 05 .byte 0x5