================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x114/0x7638 kernel/locking/lockdep.c:4882 Read of size 8 at addr ffff0000cd1b0918 by task swapper/1/0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.15.158-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x174/0x1e4 mm/kasan/report.c:451 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 __lock_acquire+0x114/0x7638 kernel/locking/lockdep.c:4882 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xc4/0x14c kernel/locking/spinlock.c:162 try_to_wake_up+0xb0/0xc2c kernel/sched/core.c:4030 wake_up_process+0x18/0x24 kernel/sched/core.c:4215 nilfs_construction_timeout+0x40/0x50 fs/nilfs2/segment.c:2446 call_timer_fn+0x19c/0x8f0 kernel/time/timer.c:1451 expire_timers kernel/time/timer.c:1496 [inline] __run_timers+0x554/0x718 kernel/time/timer.c:1767 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1780 __do_softirq+0x344/0xdb0 kernel/softirq.c:558 do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] invoke_softirq kernel/softirq.c:439 [inline] __irq_exit_rcu+0x264/0x4d4 kernel/softirq.c:637 irq_exit+0x14/0x88 kernel/softirq.c:661 handle_domain_irq+0xf4/0x178 kernel/irq/irqdesc.c:710 gic_handle_irq+0x78/0x1c8 drivers/irqchip/irq-gic-v3.c:758 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:899 do_interrupt_handler+0x74/0x94 arch/arm64/kernel/entry-common.c:267 el1_interrupt+0x30/0x58 arch/arm64/kernel/entry-common.c:454 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:470 el1h_64_irq+0x78/0x7c arch/arm64/kernel/entry.S:522 arch_local_irq_enable+0xc/0x18 arch/arm64/include/asm/irqflags.h:35 default_idle_call+0xcc/0x4a8 kernel/sched/idle.c:112 cpuidle_idle_call kernel/sched/idle.c:194 [inline] do_idle+0x1d4/0x4dc kernel/sched/idle.c:306 cpu_startup_entry+0x24/0x28 kernel/sched/idle.c:403 secondary_start_kernel+0x240/0x298 arch/arm64/kernel/smp.c:265 __secondary_switched+0x94/0x98 arch/arm64/kernel/head.S:661 Allocated by task 2: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x8c/0xcc mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x74/0x3f4 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] kmem_cache_alloc_node+0x208/0x49c mm/slub.c:3256 alloc_task_struct_node kernel/fork.c:171 [inline] dup_task_struct+0x74/0xcf0 kernel/fork.c:894 copy_process+0x52c/0x3750 kernel/fork.c:2038 kernel_clone+0x1d8/0xa58 kernel/fork.c:2604 kernel_thread+0x148/0x1bc kernel/fork.c:2656 create_kthread kernel/kthread.c:357 [inline] kthreadd+0x588/0x7d0 kernel/kthread.c:701 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Freed by task 4124: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x84 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360 ____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0x128/0x1ec mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kmem_cache_free+0xdc/0x3c4 mm/slub.c:3515 free_task_struct kernel/fork.c:176 [inline] free_task+0xe8/0x14c kernel/fork.c:474 __put_task_struct+0x1a8/0x24c kernel/fork.c:763 put_task_struct include/linux/sched/task.h:141 [inline] delayed_put_task_struct+0x124/0x380 kernel/exit.c:220 rcu_do_batch kernel/rcu/tree.c:2523 [inline] rcu_core+0x830/0x1b34 kernel/rcu/tree.c:2763 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2776 __do_softirq+0x344/0xdb0 kernel/softirq.c:558 Last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x118/0xb40 kernel/rcu/tree.c:3087 put_task_struct_rcu_user+0x70/0xe0 kernel/exit.c:226 finish_task_switch+0x3a0/0x6b4 kernel/sched/core.c:4944 context_switch kernel/sched/core.c:5033 [inline] __schedule+0xf14/0x1e48 kernel/sched/core.c:6376 schedule+0x11c/0x1c8 kernel/sched/core.c:6459 worker_thread+0xcfc/0x1034 kernel/workqueue.c:2478 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Second to last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x118/0xb40 kernel/rcu/tree.c:3087 put_task_struct_rcu_user+0x70/0xe0 kernel/exit.c:226 finish_task_switch+0x3a0/0x6b4 kernel/sched/core.c:4944 context_switch kernel/sched/core.c:5033 [inline] __schedule+0xf14/0x1e48 kernel/sched/core.c:6376 preempt_schedule_common+0x140/0x260 kernel/sched/core.c:6552 preempt_schedule+0x64/0x84 kernel/sched/core.c:6577 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] _raw_spin_unlock_irqrestore+0x114/0x158 kernel/locking/spinlock.c:194 task_rq_unlock kernel/sched/sched.h:1598 [inline] sched_move_task+0x284/0x30c kernel/sched/core.c:9961 sched_autogroup_exit_task+0x10/0x1c kernel/sched/autogroup.c:132 do_exit+0x680/0x20bc kernel/exit.c:883 do_group_exit+0x110/0x268 kernel/exit.c:994 get_signal+0x634/0x1550 kernel/signal.c:2889 do_signal arch/arm64/kernel/signal.c:890 [inline] do_notify_resume+0x3d0/0x32b8 arch/arm64/kernel/signal.c:943 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 The buggy address belongs to the object at ffff0000cd1b0000 which belongs to the cache task_struct of size 6720 The buggy address is located 2328 bytes inside of 6720-byte region [ffff0000cd1b0000, ffff0000cd1b1a40) The buggy address belongs to the page: page:00000000af4d4e5d refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000cd1b3680 pfn:0x10d1b0 head:00000000af4d4e5d order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff0000e86e2d01 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc0003693a08 fffffc0003384e08 ffff0000c0840d80 raw: ffff0000cd1b3680 0000000000040003 00000001ffffffff ffff0000e86e2d01 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cd1b0800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000cd1b0880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000cd1b0900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000cd1b0980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000cd1b0a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== vkms_vblank_simulate: vblank timer overrun