gfs2: fsid=syz:syz.0: H: s:SH f:H e:0 p:7153 [syz.6.218] __gfs2_lookup+0xa4/0x280 fs/gfs2/inode.c:896 gfs2: fsid=syz:syz.0: H: s:UN f: e:0 p:209094 [‰ö1Ò[A\A]A^A_]ée] 0x679a5ab514165fe8 ================================================================== BUG: KASAN: slab-use-after-free in gfs2_dump_glock+0x15b1/0x1bb0 Read of size 8 at addr ffff88802828a8d8 by task syz.6.218/7157 CPU: 0 UID: 0 PID: 7157 Comm: syz.6.218 Not tainted 6.12.0-rc6-syzkaller-00077-g2e1b3cc9d7f7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 gfs2_dump_glock+0x15b1/0x1bb0 gfs2_consist_inode_i+0xf5/0x110 fs/gfs2/util.c:457 gfs2_dirent_scan+0x52b/0x670 gfs2_dir_read+0x82f/0x1af0 fs/gfs2/dir.c:1602 gfs2_readdir+0x14b/0x1b0 fs/gfs2/file.c:116 iterate_dir+0x573/0x800 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:407 [inline] __se_sys_getdents64+0x1d3/0x4a0 fs/readdir.c:392 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fea2997e719 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:00007fea2a76b038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007fea29b36058 RCX: 00007fea2997e719 RDX: 0000000000001000 RSI: 0000000020000f80 RDI: 0000000000000008 RBP: 00007fea299f139e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fea29b36058 R15: 00007fff8a871e28 Allocated by task 7145: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] kmem_cache_alloc_node_noprof+0x16b/0x320 mm/slub.c:4186 alloc_task_struct_node kernel/fork.c:181 [inline] dup_task_struct+0x57/0x8c0 kernel/fork.c:1108 copy_process+0x5d1/0x3d50 kernel/fork.c:2204 kernel_clone+0x226/0x8f0 kernel/fork.c:2786 __do_sys_clone3 kernel/fork.c:3090 [inline] __se_sys_clone3+0x2d8/0x360 kernel/fork.c:3069 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 16: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4579 [inline] kmem_cache_free+0x1a2/0x420 mm/slub.c:4681 put_task_struct include/linux/sched/task.h:144 [inline] delayed_put_task_struct+0x125/0x300 kernel/exit.c:228 rcu_do_batch kernel/rcu/tree.c:2567 [inline] rcu_core+0xaac/0x17a0 kernel/rcu/tree.c:2823 handle_softirqs+0x2c7/0x980 kernel/softirq.c:554 run_ksoftirqd+0xca/0x130 kernel/softirq.c:927 smpboot_thread_fn+0x546/0xa30 kernel/smpboot.c:164 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 __call_rcu_common kernel/rcu/tree.c:3086 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:3190 context_switch kernel/sched/core.c:5331 [inline] __schedule+0x1857/0x4c30 kernel/sched/core.c:6690 __schedule_loop kernel/sched/core.c:6767 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6782 do_nanosleep+0x197/0x600 kernel/time/hrtimer.c:2032 hrtimer_nanosleep+0x1e3/0x3f0 kernel/time/hrtimer.c:2080 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1411 [inline] __se_sys_clock_nanosleep+0x32d/0x3c0 kernel/time/posix-timers.c:1388 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Second to last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 task_work_add+0xea/0x490 kernel/task_work.c:75 task_tick_mm_cid kernel/sched/core.c:10485 [inline] sched_tick+0x322/0x610 kernel/sched/core.c:5611 update_process_times+0x202/0x230 kernel/time/timer.c:2524 tick_sched_handle kernel/time/tick-sched.c:276 [inline] tick_nohz_handler+0x37c/0x500 kernel/time/tick-sched.c:297 __run_hrtimer kernel/time/hrtimer.c:1691 [inline] __hrtimer_run_queues+0x553/0xd50 kernel/time/hrtimer.c:1755 hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1817 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline] __sysvec_apic_timer_interrupt+0x112/0x420 arch/x86/kernel/apic/apic.c:1055 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 The buggy address belongs to the object at ffff888028289e00 which belongs to the cache task_struct of size 7424 The buggy address is located 2776 bytes inside of freed 7424-byte region [ffff888028289e00, ffff88802828bb00) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x28288 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888028b0d981 ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801beb9500 ffffea0000c1c200 dead000000000003 raw: 0000000000000000 0000000000040004 00000001f5000000 ffff888028b0d981 head: 00fff00000000040 ffff88801beb9500 ffffea0000c1c200 dead000000000003 head: 0000000000000000 0000000000040004 00000001f5000000 ffff888028b0d981 head: 00fff00000000003 ffffea0000a0a201 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 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 12, tgid 12 (kworker/u8:1), ts 9555271065, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x303f/0x3190 mm/page_alloc.c:3457 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x140 mm/slub.c:2412 allocate_slab+0x5a/0x2f0 mm/slub.c:2578 new_slab mm/slub.c:2631 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818 __slab_alloc+0x58/0xa0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] kmem_cache_alloc_node_noprof+0x1fe/0x320 mm/slub.c:4186 alloc_task_struct_node kernel/fork.c:181 [inline] dup_task_struct+0x57/0x8c0 kernel/fork.c:1108 copy_process+0x5d1/0x3d50 kernel/fork.c:2204 kernel_clone+0x226/0x8f0 kernel/fork.c:2786 user_mode_thread+0x132/0x1a0 kernel/fork.c:2864 call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:172 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa65/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 page_owner free stack trace missing Memory state around the buggy address: ffff88802828a780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802828a800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802828a880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802828a900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802828a980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================