==================================================================
BUG: KASAN: use-after-free in __lock_acquire+0x77/0x1f80 kernel/locking/lockdep.c:4926
Read of size 8 at addr ffff8880218c6148 by task kworker/1:1/26
CPU: 1 PID: 26 Comm: kworker/1:1 Not tainted 6.1.22-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: rcu_gp process_srcu
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
print_address_description mm/kasan/report.c:284 [inline]
print_report+0x15f/0x4f0 mm/kasan/report.c:395
kasan_report+0x136/0x160 mm/kasan/report.c:495
__lock_acquire+0x77/0x1f80 kernel/locking/lockdep.c:4926
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
try_to_wake_up+0xad/0x12b0 kernel/sched/core.c:4108
call_timer_fn+0x19e/0x6b0 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers+0x67c/0x890 kernel/time/timer.c:1790
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803
__do_softirq+0x2e9/0xa4c kernel/softirq.c:571
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x155/0x240 kernel/softirq.c:650
irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1107
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:delay_tsc+0x58/0xd0 arch/x86/lib/delay.c:79
Code: 90 48 89 d5 48 c1 e5 20 48 09 c5 48 29 dd 4c 39 f5 73 67 bf 01 00 00 00 e8 d5 d6 e2 f6 65 8b 05 16 7a 87 75 85 c0 74 2f f3 90 01 00 00 00 e8 3e d5 e2 f6 e8 a9 ed 02 00 41 39 c7 75 20 0f 01
RSP: 0018:ffffc90000a1faf0 EFLAGS: 00000286
RAX: 0000000080000000 RBX: 000000dd8b386304 RCX: 0000000000000001
RDX: 00000000000000dd RSI: ffffffff8b3cb740 RDI: 0000000000000001
RBP: 0000000000001fb7 R08: ffffffff843210f4 R09: fffffbfff1ca4d86
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffffffff1ca4dc7
R13: 00000000000078cd R14: 0000000000002af9 R15: 0000000000000001
try_check_zero+0x3ee/0x410 kernel/rcu/srcutree.c:975
srcu_advance_state kernel/rcu/srcutree.c:1522 [inline]
process_srcu+0x1dc/0x1300 kernel/rcu/srcutree.c:1623
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x268/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
Allocated by task 2:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
__kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x50/0x370 mm/slab.h:737
slab_alloc_node mm/slub.c:3398 [inline]
kmem_cache_alloc_node+0x136/0x310 mm/slub.c:3443
alloc_task_struct_node kernel/fork.c:171 [inline]
dup_task_struct+0x57/0x6d0 kernel/fork.c:969
copy_process+0x637/0x4020 kernel/fork.c:2087
kernel_clone+0x222/0x920 kernel/fork.c:2676
kernel_thread+0x152/0x1d0 kernel/fork.c:2736
create_kthread kernel/kthread.c:399 [inline]
kthreadd+0x577/0x740 kernel/kthread.c:746
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
Freed by task 6544:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
kmem_cache_free+0x292/0x510 mm/slub.c:3683
rcu_do_batch kernel/rcu/tree.c:2250 [inline]
rcu_core+0xa9a/0x1790 kernel/rcu/tree.c:2510
__do_softirq+0x2e9/0xa4c kernel/softirq.c:571
Last potentially related work creation:
kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486
call_rcu+0x163/0xa10 kernel/rcu/tree.c:2798
context_switch kernel/sched/core.c:5244 [inline]
__schedule+0x1334/0x4330 kernel/sched/core.c:6554
schedule_idle+0x4a/0x90 kernel/sched/core.c:6658
do_idle+0x62d/0x680 kernel/sched/idle.c:331
cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:400
rest_init+0x28f/0x2b0 init/main.c:729
start_kernel+0x0/0x53f init/main.c:890
start_kernel+0x496/0x53f init/main.c:1145
secondary_startup_64_no_verify+0xcf/0xdb
Second to last potentially related work creation:
kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486
call_rcu+0x163/0xa10 kernel/rcu/tree.c:2798
context_switch kernel/sched/core.c:5244 [inline]
__schedule+0x1334/0x4330 kernel/sched/core.c:6554
schedule+0xbf/0x180 kernel/sched/core.c:6630
do_nanosleep+0x182/0x600 kernel/time/hrtimer.c:2044
hrtimer_nanosleep+0x24d/0x490 kernel/time/hrtimer.c:2097
__do_sys_clock_nanosleep kernel/time/posix-timers.c:1277 [inline]
__se_sys_clock_nanosleep+0x323/0x3b0 kernel/time/posix-timers.c:1254
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
The buggy address belongs to the object at ffff8880218c57c0
which belongs to the cache task_struct of size 7232
The buggy address is located 2440 bytes inside of
7232-byte region [ffff8880218c57c0, ffff8880218c7400)
The buggy address belongs to the physical page:
page:ffffea0000863000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x218c0
head:ffffea0000863000 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff888073219481
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000001 ffff8881400073c0
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff888073219481
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 33, tgid 33 (kworker/u4:2), ts 9121662202, free_ts 0
prep_new_page mm/page_alloc.c:2540 [inline]
get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292
__alloc_pages+0x28d/0x770 mm/page_alloc.c:5559
alloc_slab_page+0x6a/0x150 mm/slub.c:1794
allocate_slab mm/slub.c:1939 [inline]
new_slab+0x84/0x2d0 mm/slub.c:1992
___slab_alloc+0xa71/0x1080 mm/slub.c:3180
__slab_alloc mm/slub.c:3279 [inline]
slab_alloc_node mm/slub.c:3364 [inline]
kmem_cache_alloc_node+0x1cf/0x310 mm/slub.c:3443
alloc_task_struct_node kernel/fork.c:171 [inline]
dup_task_struct+0x57/0x6d0 kernel/fork.c:969
copy_process+0x637/0x4020 kernel/fork.c:2087
kernel_clone+0x222/0x920 kernel/fork.c:2676
user_mode_thread+0x12e/0x190 kernel/fork.c:2752
call_usermodehelper_exec_work+0x58/0x220 kernel/umh.c:175
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x268/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
page_owner free stack trace missing
Memory state around the buggy address:
ffff8880218c6000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880218c6080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880218c6100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880218c6180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880218c6200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 90 nop
1: 48 89 d5 mov %rdx,%rbp
4: 48 c1 e5 20 shl $0x20,%rbp
8: 48 09 c5 or %rax,%rbp
b: 48 29 dd sub %rbx,%rbp
e: 4c 39 f5 cmp %r14,%rbp
11: 73 67 jae 0x7a
13: bf 01 00 00 00 mov $0x1,%edi
18: e8 d5 d6 e2 f6 callq 0xf6e2d6f2
1d: 65 8b 05 16 7a 87 75 mov %gs:0x75877a16(%rip),%eax # 0x75877a3a
24: 85 c0 test %eax,%eax
26: 74 2f je 0x57
28: f3 90 pause
* 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2f: e8 3e d5 e2 f6 callq 0xf6e2d572
34: e8 a9 ed 02 00 callq 0x2ede2
39: 41 39 c7 cmp %eax,%r15d
3c: 75 20 jne 0x5e
3e: 0f .byte 0xf
3f: 01 .byte 0x1