================================================================== BUG: KASAN: slab-use-after-free in __lock_acquire+0x114/0x763c kernel/locking/lockdep.c:5005 Read of size 8 at addr ffff0000e3b209a8 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.9.0-rc4-syzkaller-g6a71d2909427 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 __lock_acquire+0x114/0x763c kernel/locking/lockdep.c:5005 lock_acquire+0x248/0x73c kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x5c/0x7c kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline] try_to_wake_up+0xb0/0xf2c kernel/sched/core.c:4262 wake_up_process+0x18/0x24 kernel/sched/core.c:4510 nilfs_construction_timeout+0x40/0x50 fs/nilfs2/segment.c:2409 call_timer_fn+0x1b4/0x93c kernel/time/timer.c:1793 expire_timers kernel/time/timer.c:1844 [inline] __run_timers kernel/time/timer.c:2418 [inline] __run_timer_base+0x56c/0x7b4 kernel/time/timer.c:2429 run_timer_base kernel/time/timer.c:2438 [inline] run_timer_softirq+0xcc/0x194 kernel/time/timer.c:2448 __do_softirq+0x2e4/0xd2c kernel/softirq.c:554 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:81 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:86 invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x1d8/0x434 kernel/softirq.c:633 irq_exit_rcu+0x14/0x84 kernel/softirq.c:645 __el1_irq arch/arm64/kernel/entry-common.c:537 [inline] el1_interrupt+0x38/0x68 arch/arm64/kernel/entry-common.c:551 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:556 el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:594 __daif_local_irq_enable arch/arm64/include/asm/irqflags.h:26 [inline] arch_local_irq_enable+0x8/0xc arch/arm64/include/asm/irqflags.h:48 cpuidle_idle_call kernel/sched/idle.c:191 [inline] do_idle+0x1f0/0x4e4 kernel/sched/idle.c:332 cpu_startup_entry+0x5c/0x74 kernel/sched/idle.c:430 rest_init+0x2dc/0x2f4 init/main.c:737 start_kernel+0x3f0/0x4f0 init/main.c:1079 __primary_switched+0x84/0x8c arch/arm64/kernel/head.S:243 Allocated by task 2: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x74/0x8c mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3798 [inline] slab_alloc_node mm/slub.c:3845 [inline] kmem_cache_alloc_node+0x224/0x418 mm/slub.c:3888 alloc_task_struct_node kernel/fork.c:176 [inline] dup_task_struct+0x74/0x908 kernel/fork.c:1106 copy_process+0x490/0x3280 kernel/fork.c:2219 kernel_clone+0x1d8/0x838 kernel/fork.c:2796 kernel_thread+0x184/0x200 kernel/fork.c:2858 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x464/0x670 kernel/kthread.c:764 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Freed by task 6260: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:579 poison_slab_object+0x124/0x18c mm/kasan/common.c:240 __kasan_slab_free+0x3c/0x70 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kmem_cache_free+0x168/0x3f0 mm/slub.c:4344 free_task_struct kernel/fork.c:181 [inline] free_task+0xe8/0x14c kernel/fork.c:609 __put_task_struct+0x178/0x210 kernel/fork.c:981 put_task_struct+0x88/0x10c include/linux/sched/task.h:138 delayed_put_task_struct+0xf4/0x304 kernel/exit.c:229 rcu_do_batch kernel/rcu/tree.c:2196 [inline] rcu_core+0x888/0x1b3c kernel/rcu/tree.c:2471 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2488 __do_softirq+0x2e4/0xd2c kernel/softirq.c:554 Last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:47 __kasan_record_aux_stack+0xd0/0xec mm/kasan/generic.c:541 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:551 __call_rcu_common kernel/rcu/tree.c:2734 [inline] call_rcu+0x104/0xb08 kernel/rcu/tree.c:2838 put_task_struct_rcu_user+0x70/0xd8 kernel/exit.c:235 finish_task_switch+0x5b4/0x614 kernel/sched/core.c:5318 context_switch kernel/sched/core.c:5412 [inline] __schedule+0x14c0/0x24ec kernel/sched/core.c:6746 preempt_schedule_common+0xe8/0x1dc kernel/sched/core.c:6925 preempt_schedule+0x60/0x80 kernel/sched/core.c:6949 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irq+0x7c/0x80 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:401 [inline] loop_queue_work drivers/block/loop.c:883 [inline] loop_queue_rq+0x97c/0xadc drivers/block/loop.c:1874 __blk_mq_issue_directly block/blk-mq.c:2595 [inline] blk_mq_request_issue_directly+0x31c/0x568 block/blk-mq.c:2680 blk_mq_plug_issue_direct+0x200/0x4ec block/blk-mq.c:2701 blk_mq_flush_plug_list+0x648/0x1348 block/blk-mq.c:2810 __blk_flush_plug+0x388/0x460 block/blk-core.c:1190 blk_finish_plug+0x68/0x90 block/blk-core.c:1217 read_pages+0x4f8/0x694 mm/readahead.c:183 page_cache_ra_unbounded+0x460/0x560 mm/readahead.c:269 do_page_cache_ra mm/readahead.c:299 [inline] force_page_cache_ra+0x240/0x2a8 mm/readahead.c:330 page_cache_sync_ra+0x110/0x180 mm/readahead.c:684 page_cache_sync_readahead include/linux/pagemap.h:1300 [inline] filemap_get_pages+0x368/0x1630 mm/filemap.c:2505 filemap_read+0x350/0xc84 mm/filemap.c:2601 blkdev_read_iter+0x27c/0x3ac block/fops.c:754 call_read_iter include/linux/fs.h:2104 [inline] new_sync_read fs/read_write.c:395 [inline] vfs_read+0x78c/0x954 fs/read_write.c:476 ksys_read+0x15c/0x26c fs/read_write.c:619 __do_sys_read fs/read_write.c:629 [inline] __se_sys_read fs/read_write.c:627 [inline] __arm64_sys_read+0x7c/0x90 fs/read_write.c:627 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 The buggy address belongs to the object at ffff0000e3b20000 which belongs to the cache task_struct of size 7488 The buggy address is located 2472 bytes inside of freed 7488-byte region [ffff0000e3b20000, ffff0000e3b21d40) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x123b20 head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff0000cd009441 flags: 0x5ffe00000000840(slab|head|node=0|zone=2|lastcpupid=0xfff) page_type: 0xffffffff() raw: 05ffe00000000840 ffff0000c1883500 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff0000cd009441 head: 05ffe00000000840 ffff0000c1883500 dead000000000122 0000000000000000 head: 0000000000000000 0000000000040004 00000001ffffffff ffff0000cd009441 head: 05ffe00000000003 fffffdffc38ec801 dead000000000122 00000000ffffffff head: 0000000800000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e3b20880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e3b20900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000e3b20980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000e3b20a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e3b20a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== vkms_vblank_simulate: vblank timer overrun