gfs2: fsid=syz:syz.0: H: s:?? f:A e:-30592 p:0 [(none)] 0xc003a ================================================================== BUG: KASAN: slab-use-after-free in gfs2_dump_glock+0x1363/0x1920 fs/gfs2/glock.c:2421 Read of size 8 at addr ffff88807707e4d0 by task syz.8.2234/13122 CPU: 0 PID: 13122 Comm: syz.8.2234 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xac/0x220 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 gfs2_dump_glock+0x1363/0x1920 fs/gfs2/glock.c:2421 gfs2_consist_inode_i+0xf5/0x110 fs/gfs2/util.c:446 gfs2_dirent_scan+0x525/0x650 fs/gfs2/dir.c:602 gfs2_dirent_search+0x2e1/0x7e0 fs/gfs2/dir.c:850 gfs2_dir_search+0x4d/0x220 fs/gfs2/dir.c:1650 gfs2_lookupi+0x3d9/0x5a0 fs/gfs2/inode.c:339 __gfs2_lookup+0x90/0x270 fs/gfs2/inode.c:896 __lookup_slow+0x281/0x3b0 fs/namei.c:1702 lookup_slow+0x53/0x70 fs/namei.c:1719 walk_component+0x2be/0x3f0 fs/namei.c:2010 lookup_last fs/namei.c:2467 [inline] path_lookupat+0x169/0x440 fs/namei.c:2491 filename_lookup+0x1f4/0x510 fs/namei.c:2520 vfs_statx+0x113/0x6d0 fs/stat.c:244 vfs_fstatat+0x12a/0x1b0 fs/stat.c:299 __do_sys_newfstatat fs/stat.c:463 [inline] __se_sys_newfstatat fs/stat.c:457 [inline] __x64_sys_newfstatat+0x117/0x190 fs/stat.c:457 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f417038efc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4171174038 EFLAGS: 00000246 ORIG_RAX: 0000000000000106 RAX: ffffffffffffffda RBX: 00007f41705e6090 RCX: 00007f417038efc9 RDX: 0000000000000000 RSI: 0000200000000200 RDI: ffffffffffffff9c RBP: 00007f4170411f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f41705e6128 R14: 00007f41705e6090 R15: 00007ffdd3e329c8 Allocated by task 13106: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3495 [inline] kmem_cache_alloc_node+0x150/0x330 mm/slub.c:3540 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct+0x57/0x7c0 kernel/fork.c:1116 copy_process+0x549/0x3d70 kernel/fork.c:2331 kernel_clone+0x21b/0x840 kernel/fork.c:2914 __do_sys_clone3 kernel/fork.c:3215 [inline] __se_sys_clone3+0x252/0x2c0 kernel/fork.c:3199 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 16: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1811 [inline] slab_free_freelist_hook+0x130/0x1b0 mm/slub.c:1837 slab_free mm/slub.c:3830 [inline] kmem_cache_free+0xf8/0x280 mm/slub.c:3852 put_task_struct include/linux/sched/task.h:137 [inline] delayed_put_task_struct+0x10f/0x2b0 kernel/exit.c:226 rcu_do_batch kernel/rcu/tree.c:2194 [inline] rcu_core+0xcc4/0x1720 kernel/rcu/tree.c:2467 handle_softirqs+0x280/0x820 kernel/softirq.c:578 run_ksoftirqd+0x9c/0xf0 kernel/softirq.c:950 smpboot_thread_fn+0x635/0xa00 kernel/smpboot.c:164 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 __call_rcu_common kernel/rcu/tree.c:2721 [inline] call_rcu+0x158/0x930 kernel/rcu/tree.c:2837 context_switch kernel/sched/core.c:5383 [inline] __schedule+0x14da/0x44d0 kernel/sched/core.c:6699 preempt_schedule_common+0x82/0xc0 kernel/sched/core.c:6866 preempt_schedule+0xab/0xc0 kernel/sched/core.c:6890 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk_64.S:45 __raw_spin_unlock include/linux/spinlock_api_smp.h:143 [inline] _raw_spin_unlock+0x3a/0x40 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:391 [inline] copy_pte_range mm/memory.c:1106 [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+0x2b7c/0x3600 mm/memory.c:1322 dup_mmap kernel/fork.c:764 [inline] dup_mm kernel/fork.c:1692 [inline] copy_mm+0x11a8/0x1ca0 kernel/fork.c:1741 copy_process+0x16d3/0x3d70 kernel/fork.c:2506 kernel_clone+0x21b/0x840 kernel/fork.c:2914 __do_sys_clone kernel/fork.c:3057 [inline] __se_sys_clone kernel/fork.c:3041 [inline] __x64_sys_clone+0x18c/0x1e0 kernel/fork.c:3041 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 task_work_add+0xe4/0x440 kernel/task_work.c:75 task_tick_mm_cid kernel/sched/core.c:12030 [inline] scheduler_tick+0x2c9/0x6a0 kernel/sched/core.c:5663 update_process_times+0x17b/0x1b0 kernel/time/timer.c:2076 tick_sched_handle kernel/time/tick-sched.c:254 [inline] tick_sched_timer+0x3a2/0x580 kernel/time/tick-sched.c:1492 __run_hrtimer kernel/time/hrtimer.c:1750 [inline] __hrtimer_run_queues+0x4df/0xc40 kernel/time/hrtimer.c:1814 hrtimer_interrupt+0x3c9/0x9c0 kernel/time/hrtimer.c:1876 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1077 [inline] __sysvec_apic_timer_interrupt+0xfb/0x3b0 arch/x86/kernel/apic/apic.c:1094 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0x9f/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 The buggy address belongs to the object at ffff88807707da00 which belongs to the cache task_struct of size 7424 The buggy address is located 2768 bytes inside of freed 7424-byte region [ffff88807707da00, ffff88807707f700) The buggy address belongs to the physical page: page:ffffea0001dc1e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x77078 head:ffffea0001dc1e00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88805686ba41 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888019a4c500 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88805686ba41 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 13100, tgid 13100 (syz.6.2232), ts 465261437967, free_ts 465194857356 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554 prep_new_page mm/page_alloc.c:1561 [inline] get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457 alloc_slab_page+0x5d/0x170 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2e0 mm/slub.c:2081 ___slab_alloc+0xc6d/0x1300 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] kmem_cache_alloc_node+0x1ea/0x330 mm/slub.c:3540 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct+0x57/0x7c0 kernel/fork.c:1116 copy_process+0x549/0x3d70 kernel/fork.c:2331 kernel_clone+0x21b/0x840 kernel/fork.c:2914 __do_sys_clone3 kernel/fork.c:3215 [inline] __se_sys_clone3+0x252/0x2c0 kernel/fork.c:3199 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1154 [inline] free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429 discard_slab mm/slub.c:2127 [inline] __unfreeze_partials+0x1cf/0x210 mm/slub.c:2667 put_cpu_partial+0x17c/0x250 mm/slub.c:2743 __slab_free+0x31d/0x410 mm/slub.c:3700 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3495 [inline] slab_alloc mm/slub.c:3503 [inline] __kmem_cache_alloc_lru mm/slub.c:3510 [inline] kmem_cache_alloc+0x11e/0x2e0 mm/slub.c:3519 getname_flags+0xbb/0x500 fs/namei.c:140 getname fs/namei.c:219 [inline] __do_sys_unlink fs/namei.c:4447 [inline] __se_sys_unlink fs/namei.c:4445 [inline] __x64_sys_unlink+0x3c/0x50 fs/namei.c:4445 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88807707e380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807707e400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807707e480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807707e500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807707e580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================