loop4: 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 ffff88804a19b0c0 by task syz.4.20/6895 CPU: 1 UID: 0 PID: 6895 Comm: syz.4.20 Not tainted 6.16.0-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 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+0x8ce/0xce0 fs/jfs/jfs_dtree.c:2674 jfs_readdir+0x1d8f/0x3ae0 fs/jfs/jfs_dtree.c:3031 wrap_directory_iterator+0x96/0xe0 fs/readdir.c:65 iterate_dir+0x5af/0x770 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:410 [inline] __se_sys_getdents64+0xe4/0x260 fs/readdir.c:396 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4a8b38e969 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:00007f4a8c2df038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f4a8b5b5fa0 RCX: 00007f4a8b38e969 RDX: 0000000000000099 RSI: 0000200000000400 RDI: 0000000000000005 RBP: 00007f4a8b410ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4a8b5b5fa0 R15: 00007ffca4915c28 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88804a19b280 pfn:0x4a19b flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f0(buddy) raw: 00fff00000000000 ffffea0001fa23c8 ffffea00017eda48 0000000000000000 raw: ffff88804a19b280 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 0xcc0(GFP_KERNEL), pid 2, tgid 2 (kthreadd), ts 87995470643, free_ts 123068887907 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21d5/0x22b0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x560/0x710 mm/page_alloc.c:4913 ___alloc_pages_bulk mm/kasan/shadow.c:344 [inline] __kasan_populate_vmalloc mm/kasan/shadow.c:368 [inline] kasan_populate_vmalloc+0xba/0x1a0 mm/kasan/shadow.c:417 alloc_vmap_area+0xd51/0x1490 mm/vmalloc.c:2092 __get_vm_area_node+0x1f8/0x300 mm/vmalloc.c:3187 __vmalloc_node_range_noprof+0x301/0x12f0 mm/vmalloc.c:3853 __vmalloc_node_noprof+0xc2/0x110 mm/vmalloc.c:3956 alloc_thread_stack_node kernel/fork.c:317 [inline] dup_task_struct+0x3e7/0x860 kernel/fork.c:877 copy_process+0x544/0x3b80 kernel/fork.c:1999 kernel_clone+0x224/0x7f0 kernel/fork.c:2599 kernel_thread+0x10c/0x160 kernel/fork.c:2661 create_kthread kernel/kthread.c:487 [inline] kthreadd+0x575/0x770 kernel/kthread.c:847 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 5863 tgid 5863 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc65/0xe60 mm/page_alloc.c:2706 kasan_depopulate_vmalloc_pte+0x74/0xa0 mm/kasan/shadow.c:472 apply_to_pte_range mm/memory.c:3032 [inline] apply_to_pmd_range mm/memory.c:3076 [inline] apply_to_pud_range mm/memory.c:3112 [inline] apply_to_p4d_range mm/memory.c:3148 [inline] __apply_to_page_range+0xb92/0x1380 mm/memory.c:3184 kasan_release_vmalloc+0xa2/0xd0 mm/kasan/shadow.c:593 kasan_release_vmalloc_node mm/vmalloc.c:2249 [inline] purge_vmap_node+0x214/0x8f0 mm/vmalloc.c:2266 __purge_vmap_area_lazy+0x7a4/0xb40 mm/vmalloc.c:2356 drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2390 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88804a19af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804a19b000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88804a19b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804a19b100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804a19b180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================