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+0x310/0x440 fs/hfs/bnode.c:70 Write of size 256 at addr ffff888029029980 by task syz-executor.0/5454 CPU: 1 PID: 5454 Comm: syz-executor.0 Not tainted 6.6.0-rc3-syzkaller-00146-g9f3ebbef746f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x15f/0x540 mm/kasan/report.c:475 kasan_report+0x171/0x1b0 mm/kasan/report.c:588 kasan_check_range+0x27a/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x3c/0x60 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+0x310/0x440 fs/hfs/bnode.c:70 hfs_brec_insert+0x69d/0xbd0 fs/hfs/brec.c:141 hfs_cat_create+0x5bc/0x960 fs/hfs/catalog.c:131 hfs_create+0x62/0xd0 fs/hfs/dir.c:202 lookup_open fs/namei.c:3495 [inline] open_last_lookups fs/namei.c:3563 [inline] path_openat+0x13e3/0x3180 fs/namei.c:3793 do_filp_open+0x230/0x480 fs/namei.c:3823 do_sys_openat2+0x13a/0x1c0 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+0x243/0x290 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff17727cb29 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:00007ff177f650c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007ff17739bf80 RCX: 00007ff17727cb29 RDX: 0000000000141842 RSI: 0000000020000380 RDI: ffffffffffffff9c RBP: 00007ff1772c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007ff17739bf80 R15: 00007ffc87f41b68 Allocated by task 5454: 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+0x94/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1023 [inline] __kmalloc+0xb5/0x220 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] hfs_find_init+0x8c/0x1e0 fs/hfs/bfind.c:21 hfs_cat_create+0x17a/0x960 fs/hfs/catalog.c:96 hfs_create+0x62/0xd0 fs/hfs/dir.c:202 lookup_open fs/namei.c:3495 [inline] open_last_lookups fs/namei.c:3563 [inline] path_openat+0x13e3/0x3180 fs/namei.c:3793 do_filp_open+0x230/0x480 fs/namei.c:3823 do_sys_openat2+0x13a/0x1c0 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+0x243/0x290 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888029029980 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of allocated 78-byte region [ffff888029029980, ffff8880290299ce) The buggy address belongs to the physical page: page:ffffea0000a40a40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29029 anon flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888012841780 ffffea0000a81e00 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 4491, tgid 4491 (S10udev), ts 20218821244, free_ts 20202924822 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1d2/0x1f0 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31b7/0x3330 mm/page_alloc.c:3170 __alloc_pages+0x251/0x660 mm/page_alloc.c:4426 alloc_slab_page+0x6a/0x150 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x84/0x2d0 mm/slub.c:2070 ___slab_alloc+0xc75/0x1300 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+0x1a7/0x260 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1022 [inline] __kmalloc+0xa4/0x220 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] kzalloc include/linux/slab.h:720 [inline] tomoyo_commit_ok+0x25/0x1d0 security/tomoyo/memory.c:76 tomoyo_assign_domain+0x61d/0x830 security/tomoyo/domain.c:576 tomoyo_find_next_domain+0xdbd/0x1cf0 security/tomoyo/domain.c:846 tomoyo_bprm_check_security+0x110/0x170 security/tomoyo/tomoyo.c:101 security_bprm_check+0x5f/0xa0 security/security.c:1103 search_binary_handler fs/exec.c:1727 [inline] exec_binprm fs/exec.c:1781 [inline] bprm_execve+0x8c3/0x17c0 fs/exec.c:1856 do_execveat_common+0x580/0x720 fs/exec.c:1964 do_execve fs/exec.c:2038 [inline] __do_sys_execve fs/exec.c:2114 [inline] __se_sys_execve fs/exec.c:2109 [inline] __x64_sys_execve+0x8e/0xa0 fs/exec.c:2109 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+0x8ae/0x9d0 mm/page_alloc.c:2312 free_unref_page_list+0x58e/0x830 mm/page_alloc.c:2451 release_pages+0x26e2/0x2a00 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x348/0x4d0 mm/mmu_gather.c:300 tlb_finish_mmu+0xd0/0x1f0 mm/mmu_gather.c:392 exit_mmap+0x4cf/0xc20 mm/mmap.c:3223 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21b/0x2f0 kernel/exit.c:567 do_exit+0x9ab/0x2650 kernel/exit.c:861 do_group_exit+0x202/0x2b0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1033 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888029029880: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888029029900: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc >ffff888029029980: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff888029029a00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888029029a80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================