================================================================== BUG: KASAN: use-after-free in dtMoveEntry fs/jfs/jfs_dtree.c:4218 [inline] BUG: KASAN: use-after-free in dtSplitPage+0x1ac1/0x31d0 fs/jfs/jfs_dtree.c:1559 Write of size 1 at addr ffff888058a68000 by task syz.1.73/4649 CPU: 1 PID: 4649 Comm: syz.1.73 Not tainted 5.15.182-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 dtMoveEntry fs/jfs/jfs_dtree.c:4218 [inline] dtSplitPage+0x1ac1/0x31d0 fs/jfs/jfs_dtree.c:1559 dtSplitUp fs/jfs/jfs_dtree.c:1090 [inline] dtInsert+0xf2a/0x5730 fs/jfs/jfs_dtree.c:869 jfs_create+0x69d/0xa50 fs/jfs/namei.c:137 lookup_open fs/namei.c:3462 [inline] open_last_lookups fs/namei.c:3532 [inline] path_openat+0x11e1/0x2f30 fs/namei.c:3739 do_filp_open+0x1b3/0x3e0 fs/namei.c:3769 do_sys_openat2+0x142/0x4a0 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_creat fs/open.c:1345 [inline] __se_sys_creat fs/open.c:1339 [inline] __x64_sys_creat+0x8c/0xb0 fs/open.c:1339 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f3cd83cb969 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:00007f3cd6212038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f3cd85f3080 RCX: 00007f3cd83cb969 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00002000000006c0 RBP: 00007f3cd844dab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3cd85f3080 R15: 00007fff26c577a8 The buggy address belongs to the page: page:ffffea0001629a00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58a68 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001612608 ffffea0001629a48 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x500dc0(GFP_USER|__GFP_ZERO|__GFP_ACCOUNT), pid 4170, ts 89482200860, free_ts 89676314024 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 __pte_alloc_one include/asm-generic/pgalloc.h:63 [inline] pte_alloc_one+0x80/0x2f0 arch/x86/mm/pgtable.c:33 __pte_alloc+0x21/0x150 mm/memory.c:439 copy_pte_range mm/memory.c:1032 [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+0x29b8/0x3220 mm/memory.c:1301 dup_mmap kernel/fork.c:615 [inline] dup_mm kernel/fork.c:1466 [inline] copy_mm+0xc5e/0x1370 kernel/fork.c:1518 copy_process+0x17d5/0x3e60 kernel/fork.c:2205 kernel_clone+0x219/0x930 kernel/fork.c:2603 __do_sys_clone kernel/fork.c:2720 [inline] __se_sys_clone kernel/fork.c:2704 [inline] __x64_sys_clone+0x170/0x1c0 kernel/fork.c:2704 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x122/0x7e0 mm/page_alloc.c:3433 release_pages+0x184b/0x1bb0 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x164/0x2e0 mm/mmu_gather.c:338 exit_mmap+0x3a6/0x5f0 mm/mmap.c:3206 __mmput+0x115/0x3b0 kernel/fork.c:1127 exit_mm+0x567/0x6c0 kernel/exit.c:550 do_exit+0x599/0x20a0 kernel/exit.c:861 do_group_exit+0x12e/0x300 kernel/exit.c:996 get_signal+0x6ca/0x12c0 kernel/signal.c:2900 arch_do_signal_or_restart+0xc1/0x1300 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888058a67f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888058a67f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888058a68000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888058a68080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888058a68100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================