loop0: detected capacity change from 0 to 64 ================================================================== BUG: KASAN: out-of-bounds in hfs_bnode_move+0xea/0x130 fs/hfs/bnode.c:143 Read of size 18446744073709486080 at addr ffff88804d035400 by task syz.0.0/5335 CPU: 0 UID: 0 PID: 5335 Comm: syz.0.0 Not tainted 6.16.0-rc7-syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x230 mm/kasan/report.c:480 kasan_report+0x118/0x150 mm/kasan/report.c:593 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 __asan_memmove+0x29/0x70 mm/kasan/shadow.c:94 hfs_bnode_move+0xea/0x130 fs/hfs/bnode.c:143 hfs_brec_remove+0x467/0x550 fs/hfs/brec.c:222 hfs_cat_move+0x6fb/0x960 fs/hfs/catalog.c:364 hfs_rename+0x1dc/0x2d0 fs/hfs/dir.c:299 vfs_rename+0xb99/0xec0 fs/namei.c:5137 do_renameat2+0x878/0xc50 fs/namei.c:5286 __do_sys_rename fs/namei.c:5333 [inline] __se_sys_rename fs/namei.c:5331 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:5331 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:0x7f36ce38e9a9 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:00007f36cf11c038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f36ce5b5fa0 RCX: 00007f36ce38e9a9 RDX: 0000000000000000 RSI: 0000200000000780 RDI: 00002000000003c0 RBP: 00007f36ce410d69 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f36ce5b5fa0 R15: 00007ffc99c2ef58 The buggy address belongs to the physical page: page: refcount:1 mapcount:1 mapping:0000000000000000 index:0x200000037 pfn:0x4d035 memcg:ffff88801c2c8d00 anon flags: 0x4fff60000020828(uptodate|lru|owner_2|swapbacked|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff60000020828 ffffea0001340d08 ffffea0001340d88 ffff88801180d221 raw: 0000000200000037 0000000000000000 0000000100000000 ffff88801c2c8d00 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|__GFP_COMP), pid 5334, tgid 5334 (syz.0.0), ts 75713883638, free_ts 75707677444 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+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 folio_alloc_mpol_noprof mm/mempolicy.c:2438 [inline] vma_alloc_folio_noprof+0xe4/0x200 mm/mempolicy.c:2473 folio_prealloc+0x30/0x180 mm/memory.c:-1 alloc_anon_folio mm/memory.c:5014 [inline] do_anonymous_page mm/memory.c:5071 [inline] do_pte_missing mm/memory.c:4249 [inline] handle_pte_fault mm/memory.c:6069 [inline] __handle_mm_fault+0x2c88/0x5620 mm/memory.c:6212 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6381 do_user_addr_fault+0xa81/0x1390 arch/x86/mm/fault.c:1336 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 page last free pid 5311 tgid 5311 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] free_unref_folios+0xc66/0x14d0 mm/page_alloc.c:2763 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x49e/0x14b0 mm/shmem.c:1125 shmem_truncate_range mm/shmem.c:1237 [inline] shmem_evict_inode+0x272/0xa70 mm/shmem.c:1365 evict+0x501/0x9c0 fs/inode.c:810 __dentry_kill+0x209/0x660 fs/dcache.c:669 dput+0x19f/0x2b0 fs/dcache.c:911 do_renameat2+0x888/0xc50 fs/namei.c:5288 __do_sys_rename fs/namei.c:5333 [inline] __se_sys_rename fs/namei.c:5331 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:5331 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 Memory state around the buggy address: ffff88804d035300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804d035380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804d035400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88804d035480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804d035500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================