loop0: detected capacity change from 0 to 64 hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_page include/linux/highmem.h:417 [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+0x314/0x440 fs/hfs/bnode.c:70 Write of size 256 at addr ffff888027063b80 by task syz-executor.0/5448 CPU: 1 PID: 5448 Comm: syz-executor.0 Not tainted 6.6.0-rc2-syzkaller-gce9ecca0238b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 memcpy_from_page include/linux/highmem.h:417 [inline] hfs_bnode_read fs/hfs/bnode.c:35 [inline] hfs_bnode_read_key+0x314/0x440 fs/hfs/bnode.c:70 hfs_brec_insert+0x6a1/0xbd0 fs/hfs/brec.c:141 hfs_cat_create+0x5c0/0x970 fs/hfs/catalog.c:131 hfs_create+0x66/0xd0 fs/hfs/dir.c:202 lookup_open fs/namei.c:3495 [inline] open_last_lookups fs/namei.c:3563 [inline] path_openat+0x13e7/0x3180 fs/namei.c:3793 do_filp_open+0x234/0x490 fs/namei.c:3823 do_sys_openat2+0x13e/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f749e07c959 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:00007f749d3fe0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f749e19bf80 RCX: 00007f749e07c959 RDX: 0000000000141842 RSI: 0000000020000380 RDI: ffffffffffffff9c RBP: 00007f749e0d8c88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f749e19bf80 R15: 00007ffce4dccf98 Allocated by task 5448: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1023 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] hfs_find_init+0x90/0x1f0 fs/hfs/bfind.c:21 hfs_cat_create+0x17e/0x970 fs/hfs/catalog.c:96 hfs_create+0x66/0xd0 fs/hfs/dir.c:202 lookup_open fs/namei.c:3495 [inline] open_last_lookups fs/namei.c:3563 [inline] path_openat+0x13e7/0x3180 fs/namei.c:3793 do_filp_open+0x234/0x490 fs/namei.c:3823 do_sys_openat2+0x13e/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888027063b80 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of allocated 78-byte region [ffff888027063b80, ffff888027063bce) The buggy address belongs to the physical page: page:ffffea00009c18c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27063 anon flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888012841780 ffffea000050a3c0 dead000000000005 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 0x12c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY), pid 4486, tgid 4486 (udevd), ts 20344920460, free_ts 18126794052 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 alloc_slab_page+0x6a/0x160 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x84/0x2f0 mm/slub.c:2070 ___slab_alloc+0xc85/0x1310 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x1af/0x270 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1022 [inline] __kmalloc+0xa8/0x230 mm/slab_common.c:1036 kmalloc_array include/linux/slab.h:636 [inline] kcalloc include/linux/slab.h:667 [inline] ext4_find_extent+0x36c/0xde0 fs/ext4/extents.c:914 ext4_ext_map_blocks+0x2cb/0x7150 fs/ext4/extents.c:4101 ext4_map_blocks+0x405/0x1cb0 fs/ext4/inode.c:548 ext4_mpage_readpages+0xb8e/0x2ac0 fs/ext4/readpage.c:297 read_pages+0x183/0x830 mm/readahead.c:160 page_cache_ra_unbounded+0x68e/0x7c0 mm/readahead.c:269 page_cache_sync_readahead include/linux/pagemap.h:1293 [inline] filemap_get_pages+0x49c/0x2080 mm/filemap.c:2556 filemap_read+0x42b/0x10b0 mm/filemap.c:2652 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2405 kasan_depopulate_vmalloc_pte+0x74/0x90 mm/kasan/shadow.c:427 apply_to_pte_range mm/memory.c:2586 [inline] apply_to_pmd_range mm/memory.c:2630 [inline] apply_to_pud_range mm/memory.c:2666 [inline] apply_to_p4d_range mm/memory.c:2702 [inline] __apply_to_page_range+0x8e2/0xe00 mm/memory.c:2736 kasan_release_vmalloc+0x9a/0xb0 mm/kasan/shadow.c:544 __purge_vmap_area_lazy+0xc0f/0x19c0 mm/vmalloc.c:1770 _vm_unmap_aliases+0x7d1/0x870 mm/vmalloc.c:2306 change_page_attr_set_clr+0x2f8/0xf80 arch/x86/mm/pat/set_memory.c:1838 change_page_attr_set arch/x86/mm/pat/set_memory.c:1879 [inline] set_memory_nx+0xf2/0x130 arch/x86/mm/pat/set_memory.c:2072 free_init_pages arch/x86/mm/init.c:927 [inline] free_kernel_image_pages arch/x86/mm/init.c:946 [inline] free_initmem+0x75/0xc0 arch/x86/mm/init.c:973 kernel_init+0x31/0x2a0 init/main.c:1446 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff888027063a80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888027063b00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff888027063b80: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff888027063c00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888027063c80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================