loop7: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in diWrite+0x1132/0x1e30 fs/jfs/jfs_imap.c:753 Write of size 32 at addr ffff88804dce70c0 by task syz.7.415/9365 CPU: 1 UID: 0 PID: 9365 Comm: syz.7.415 Not tainted 6.14.0-rc6-syzkaller-00103-g4003c9e78778 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 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:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 diWrite+0x1132/0x1e30 fs/jfs/jfs_imap.c:753 txCommit+0xa1a/0x6b90 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices+0x8b3/0xbf0 fs/jfs/jfs_dtree.c:2663 jfs_readdir+0x20ad/0x3cb0 fs/jfs/jfs_dtree.c:3019 wrap_directory_iterator+0x91/0xd0 fs/readdir.c:65 iterate_dir+0x5a9/0x760 fs/readdir.c:108 __do_sys_getdents fs/readdir.c:322 [inline] __se_sys_getdents+0x1fd/0x4e0 fs/readdir.c:308 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:0x7f808658d169 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:00007f808749a038 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f80867a5fa0 RCX: 00007f808658d169 RDX: 00000000000000b0 RSI: 0000400000001fc0 RDI: 0000000000000004 RBP: 00007f808660e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f80867a5fa0 R15: 00007ffc4f2eeaf8 Allocated by task 9377: 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:250 [inline] slab_post_alloc_hook mm/slub.c:4115 [inline] slab_alloc_node mm/slub.c:4164 [inline] kmem_cache_alloc_noprof+0x1d9/0x380 mm/slub.c:4171 anon_vma_alloc mm/rmap.c:94 [inline] __anon_vma_prepare+0x117/0x4a0 mm/rmap.c:202 __vmf_anon_prepare mm/memory.c:3402 [inline] vmf_anon_prepare mm/internal.h:372 [inline] do_anonymous_page mm/memory.c:4888 [inline] do_pte_missing mm/memory.c:4058 [inline] handle_pte_fault mm/memory.c:5907 [inline] __handle_mm_fault+0x617e/0x70f0 mm/memory.c:6050 handle_mm_fault+0x2c1/0x7e0 mm/memory.c:6219 faultin_page mm/gup.c:1196 [inline] __get_user_pages+0x1a92/0x4140 mm/gup.c:1491 __get_user_pages_locked mm/gup.c:1757 [inline] get_user_pages_remote+0x31e/0xb60 mm/gup.c:2661 get_arg_page+0x126/0x360 fs/exec.c:217 copy_string_kernel+0x176/0x240 fs/exec.c:676 do_execveat_common+0x3fc/0x710 fs/exec.c:1937 do_execve fs/exec.c:2040 [inline] __do_sys_execve fs/exec.c:2116 [inline] __se_sys_execve fs/exec.c:2111 [inline] __x64_sys_execve+0x92/0xb0 fs/exec.c:2111 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 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xaa/0xc0 mm/kasan/generic.c:548 slab_free_hook mm/slub.c:2314 [inline] slab_free mm/slub.c:4609 [inline] kmem_cache_free+0x2fb/0x410 mm/slub.c:4711 anon_vma_free mm/rmap.c:137 [inline] __put_anon_vma+0x128/0x2d0 mm/rmap.c:2568 put_anon_vma include/linux/rmap.h:116 [inline] unlink_anon_vmas+0x492/0x5f0 mm/rmap.c:444 free_pgtables+0x2a1/0x840 mm/memory.c:387 exit_mmap+0x522/0xd40 mm/mmap.c:1295 __mmput+0x115/0x410 kernel/fork.c:1356 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9ad/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 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 The buggy address belongs to the object at ffff88804dce7000 which belongs to the cache anon_vma of size 208 The buggy address is located 192 bytes inside of allocated 208-byte region [ffff88804dce7000, ffff88804dce70d0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88804dce7ee0 pfn:0x4dce7 memcg:ffff888028b2a301 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801c287140 0000000000000000 0000000000000001 raw: ffff88804dce7ee0 00000000000f000a 00000000f5000000 ffff888028b2a301 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 9222, tgid 9222 (rm), ts 299058231761, free_ts 299047684263 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4740 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2587 new_slab mm/slub.c:2640 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] kmem_cache_alloc_noprof+0x268/0x380 mm/slub.c:4171 anon_vma_alloc mm/rmap.c:94 [inline] __anon_vma_prepare+0x117/0x4a0 mm/rmap.c:202 __vmf_anon_prepare mm/memory.c:3402 [inline] vmf_anon_prepare mm/internal.h:372 [inline] do_anonymous_page mm/memory.c:4888 [inline] do_pte_missing mm/memory.c:4058 [inline] handle_pte_fault mm/memory.c:5907 [inline] __handle_mm_fault+0x617e/0x70f0 mm/memory.c:6050 handle_mm_fault+0x2c1/0x7e0 mm/memory.c:6219 do_user_addr_fault arch/x86/mm/fault.c:1337 [inline] handle_page_fault arch/x86/mm/fault.c:1480 [inline] exc_page_fault+0x459/0x8b0 arch/x86/mm/fault.c:1538 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 page last free pid 5903 tgid 5903 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe04/0x10e0 mm/page_alloc.c:2660 vfree+0x1c3/0x360 mm/vmalloc.c:3383 delayed_vfree_work+0x56/0x80 mm/vmalloc.c:3303 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd30 kernel/workqueue.c:3400 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88804dce6f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804dce7000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804dce7080: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff88804dce7100: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804dce7180: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================