================================================================== BUG: KASAN: use-after-free in jfs_readdir+0x18dc/0x33f0 fs/jfs/jfs_dtree.c:2903 Read of size 1 at addr ffff888034062120 by task syz.1.41/6049 CPU: 0 UID: 0 PID: 6049 Comm: syz.1.41 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 jfs_readdir+0x18dc/0x33f0 fs/jfs/jfs_dtree.c:2903 wrap_directory_iterator+0x99/0xe0 fs/readdir.c:67 iterate_dir+0x2f1/0x4e0 fs/readdir.c:110 __do_sys_getdents fs/readdir.c:319 [inline] __se_sys_getdents+0xf1/0x270 fs/readdir.c:304 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f47cf5ae159 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f47cd806028 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f47cf835fa0 RCX: 00007f47cf5ae159 RDX: 00000000000000bb RSI: ffffffff81000000 RDI: 0000000000000004 RBP: 00007f47cf64503b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f47cf836038 R14: 00007f47cf835fa0 R15: 00007ffe3860af58 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x20000013f pfn:0x34062 flags: 0x80000000000000(node=0|zone=1) page_type: f0(buddy) raw: 0080000000000000 ffffea0000ce83c8 ffffea0000d44208 0000000000000000 raw: 000000020000013f 0000000000000000 00000000f0000000 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 0x140dc2(GFP_HIGHUSER|__GFP_ZERO|__GFP_COMP), pid 6025, tgid 6024 (syz.2.35), ts 137976805112 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2591/0x2600 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x230/0x5c0 mm/page_alloc.c:5436 alloc_pages_mpol+0xd4/0x280 mm/mempolicy.c:2486 folio_alloc_mpol_noprof+0x3b/0x1e0 mm/mempolicy.c:2505 vma_alloc_folio_noprof+0xe1/0x1e0 mm/mempolicy.c:2540 folio_prealloc mm/memory.c:-1 [inline] alloc_anon_folio mm/memory.c:5387 [inline] do_anonymous_page mm/memory.c:5482 [inline] do_pte_missing+0x835/0x28f0 mm/memory.c:4698 handle_pte_fault mm/memory.c:6558 [inline] __handle_mm_fault mm/memory.c:6707 [inline] handle_mm_fault+0xf64/0x28c0 mm/memory.c:6876 faultin_page mm/gup.c:1126 [inline] __get_user_pages+0x1676/0x2650 mm/gup.c:1428 __get_user_pages_locked mm/gup.c:1692 [inline] __gup_longterm_locked+0x3bc/0x15c0 mm/gup.c:2476 gup_fast_fallback+0x1d4d/0x2090 mm/gup.c:3209 io_pin_pages+0xc7/0x1a0 io_uring/memmap.c:78 io_sqe_buffer_register+0x21f/0x1360 io_uring/rsrc.c:884 io_sqe_buffers_register+0x2eb/0x7e0 io_uring/rsrc.c:995 __io_uring_register io_uring/register.c:778 [inline] __do_sys_io_uring_register io_uring/register.c:1040 [inline] __se_sys_io_uring_register+0x11a1/0x1a20 io_uring/register.c:1017 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 page last free pid 6025 tgid 6024 ts 139741083193 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] free_unref_folios+0xd0f/0x1950 mm/page_alloc.c:3022 folios_put_refs+0x815/0x920 mm/folio.c:1034 free_pages_and_swap_cache+0x2ba/0x490 mm/swap_state.c:592 __tlb_batch_free_encoded_pages mm/mmu_gather.c:138 [inline] tlb_batch_pages_flush mm/mmu_gather.c:151 [inline] tlb_flush_mmu_free mm/mmu_gather.c:417 [inline] tlb_flush_mmu+0x6d3/0xa30 mm/mmu_gather.c:424 zap_pte_range mm/memory.c:2104 [inline] zap_pmd_range mm/memory.c:2151 [inline] zap_pud_range mm/memory.c:2179 [inline] zap_p4d_range mm/memory.c:2200 [inline] __zap_vma_range+0x3c9c/0x4a60 mm/memory.c:2240 unmap_vmas+0x390/0x550 mm/memory.c:2309 exit_mmap+0x293/0x9f0 mm/mmap.c:1315 __mmput+0xcb/0x3d0 kernel/fork.c:1193 exit_mm+0x186/0x240 kernel/exit.c:614 do_exit+0x6cd/0x2360 kernel/exit.c:996 do_group_exit+0x22d/0x2f0 kernel/exit.c:1151 get_signal+0x121b/0x12c0 kernel/signal.c:3039 arch_do_signal_or_restart+0xbb/0x860 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop+0x10e/0x770 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:336 [inline] do_syscall_64+0x328/0x520 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888034062000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888034062080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888034062100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888034062180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888034062200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================