loop1: detected capacity change from 0 to 64 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_page include/linux/highmem.h:393 [inline] BUG: KASAN: slab-out-of-bounds in hfs_bnode_read fs/hfs/bnode.c:35 [inline] BUG: KASAN: slab-out-of-bounds in hfs_bnode_read_key+0x310/0x440 fs/hfs/bnode.c:70 Write of size 94 at addr ffff8880558c1a80 by task syz.1.8/4347 CPU: 1 PID: 4347 Comm: syz.1.8 Not tainted 6.1.119-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 kasan_check_range+0x27f/0x290 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 memcpy_from_page include/linux/highmem.h:393 [inline] hfs_bnode_read fs/hfs/bnode.c:35 [inline] hfs_bnode_read_key+0x310/0x440 fs/hfs/bnode.c:70 hfs_brec_insert+0x7ef/0xbd0 fs/hfs/brec.c:159 hfs_cat_create+0x419/0xa60 fs/hfs/catalog.c:118 hfs_mkdir+0x68/0xe0 fs/hfs/dir.c:232 vfs_mkdir+0x3b6/0x590 fs/namei.c:4106 do_mkdirat+0x225/0x360 fs/namei.c:4131 __do_sys_mkdirat fs/namei.c:4146 [inline] __se_sys_mkdirat fs/namei.c:4144 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4144 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f857877e747 Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 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:00007f85794dde88 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f85794ddf10 RCX: 00007f857877e747 RDX: 00000000000001ff RSI: 00000000200000c0 RDI: 00000000ffffff9c RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000200000c0 R13: 00007f85794dded0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4347: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xb2/0x230 mm/slab_common.c:949 kmalloc include/linux/slab.h:562 [inline] hfs_find_init+0x8c/0x1e0 fs/hfs/bfind.c:21 hfs_cat_create+0x17e/0xa60 fs/hfs/catalog.c:96 hfs_mkdir+0x68/0xe0 fs/hfs/dir.c:232 vfs_mkdir+0x3b6/0x590 fs/namei.c:4106 do_mkdirat+0x225/0x360 fs/namei.c:4131 __do_sys_mkdirat fs/namei.c:4146 [inline] __se_sys_mkdirat fs/namei.c:4144 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4144 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff8880558c1a80 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of 96-byte region [ffff8880558c1a80, ffff8880558c1ae0) The buggy address belongs to the physical page: page:ffffea0001563040 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x558c1 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888017c41780 raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4353, tgid 4350 (syz.2.3), ts 82226795126, free_ts 21549684206 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2517 prep_new_page mm/page_alloc.c:2524 [inline] get_page_from_freelist+0x3731/0x38d0 mm/page_alloc.c:4313 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5590 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_slab_page+0x59/0x150 mm/slub.c:1796 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc_node+0xa2/0x230 mm/slab_common.c:943 kmalloc_array_node include/linux/slab.h:670 [inline] kcalloc_node include/linux/slab.h:675 [inline] memcg_alloc_slab_cgroups+0x7d/0x120 mm/memcontrol.c:2886 account_slab mm/slab.h:635 [inline] allocate_slab mm/slub.c:1957 [inline] new_slab+0xc0/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc_lru+0x1a5/0x2d0 mm/slub.c:3429 alloc_inode_sb include/linux/fs.h:3245 [inline] alloc_inode fs/inode.c:263 [inline] new_inode_pseudo+0x81/0x1d0 fs/inode.c:1059 new_inode+0x25/0x1d0 fs/inode.c:1087 debugfs_get_inode fs/debugfs/inode.c:72 [inline] __debugfs_create_file+0x147/0x500 fs/debugfs/inode.c:432 kvm_create_vm_debugfs+0x486/0x9a0 virt/kvm/kvm_main.c:1089 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1444 [inline] free_pcp_prepare mm/page_alloc.c:1494 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3369 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3464 free_contig_range+0x9a/0x150 mm/page_alloc.c:9550 destroy_args+0xfe/0x997 mm/debug_vm_pgtable.c:1031 debug_vm_pgtable+0x416/0x46b mm/debug_vm_pgtable.c:1354 do_one_initcall+0x265/0x8f0 init/main.c:1298 do_initcall_level+0x157/0x207 init/main.c:1371 do_initcalls+0x49/0x86 init/main.c:1387 kernel_init_freeable+0x45c/0x60f init/main.c:1626 kernel_init+0x19/0x290 init/main.c:1514 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff8880558c1980: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc ffff8880558c1a00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8880558c1a80: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff8880558c1b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880558c1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================