loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: use-after-free in diWrite+0x1209/0x1f40 fs/jfs/jfs_imap.c:753 Write of size 32 at addr ffff8880720f40c0 by task syz-executor.0/6195 CPU: 1 UID: 0 PID: 6195 Comm: syz-executor.0 Not tainted 6.15.0-rc6-syzkaller-00346-g5723cc3450bc #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xb4/0x290 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x29a/0x2b0 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 diWrite+0x1209/0x1f40 fs/jfs/jfs_imap.c:753 txCommit+0x852/0x5430 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices+0x87d/0xbc0 fs/jfs/jfs_dtree.c:2664 jfs_readdir+0x1da4/0x3ac0 fs/jfs/jfs_dtree.c:3020 wrap_directory_iterator+0x93/0xe0 fs/readdir.c:65 iterate_dir+0x5ac/0x770 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:403 [inline] __se_sys_getdents64+0xe4/0x260 fs/readdir.c:389 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f94ea47dea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f94e97fe0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f94ea5abf80 RCX: 00007f94ea47dea9 RDX: 000000000000005d RSI: 00000000200002c0 RDI: 0000000000000005 RBP: 00007f94ea4ca4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f94ea5abf80 R15: 00007ffe22974438 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x720f4 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001c83d48 ffffea0001e86448 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 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 6191, tgid 6191 (dhcpcd-run-hook), ts 101272343039, free_ts 101328905071 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21c7/0x22a0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 pagetable_alloc_noprof include/linux/mm.h:3002 [inline] pmd_alloc_one_noprof include/asm-generic/pgalloc.h:137 [inline] __pmd_alloc+0x3a/0x350 mm/memory.c:6647 pmd_alloc include/linux/mm.h:2965 [inline] copy_pmd_range+0x6bf3/0x7000 mm/memory.c:1235 copy_pud_range mm/memory.c:1292 [inline] copy_p4d_range mm/memory.c:1316 [inline] copy_page_range+0x95c/0xd40 mm/memory.c:1410 dup_mmap kernel/fork.c:727 [inline] dup_mm kernel/fork.c:1735 [inline] copy_mm+0x126a/0x2160 kernel/fork.c:1787 copy_process+0x16d3/0x3b80 kernel/fork.c:2430 kernel_clone+0x224/0x7f0 kernel/fork.c:2845 __do_sys_clone kernel/fork.c:2988 [inline] __se_sys_clone kernel/fork.c:2972 [inline] __x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2972 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 58 tgid 58 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] __free_frozen_pages+0xb05/0xcd0 mm/page_alloc.c:2721 pagetable_free include/linux/mm.h:3019 [inline] pagetable_dtor_free include/linux/mm.h:3117 [inline] __tlb_remove_table+0x2d2/0x3b0 include/asm-generic/tlb.h:215 __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2568 [inline] rcu_core+0xca5/0x1710 kernel/rcu/tree.c:2824 handle_softirqs+0x283/0x870 kernel/softirq.c:579 do_softirq+0xec/0x180 kernel/softirq.c:480 __local_bh_enable_ip+0x17d/0x1c0 kernel/softirq.c:407 ipv6_get_lladdr+0x2aa/0x3f0 net/ipv6/addrconf.c:1937 mld_newpack+0x420/0xc40 net/ipv6/mcast.c:1802 add_grhead+0x5a/0x2a0 net/ipv6/mcast.c:1899 add_grec+0x13b2/0x1670 net/ipv6/mcast.c:2037 mld_send_cr net/ipv6/mcast.c:2163 [inline] mld_ifc_work+0x6e6/0xde0 net/ipv6/mcast.c:2702 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xade/0x17a0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 Memory state around the buggy address: ffff8880720f3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880720f4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880720f4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880720f4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880720f4180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================