================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_page include/linux/highmem.h:423 [inline] BUG: KASAN: slab-out-of-bounds in hfs_bnode_read+0x134/0x1c0 fs/hfs/bnode.c:35 Write of size 94 at addr ffff0000d7cbfe00 by task syz.0.83/7105 CPU: 1 UID: 0 PID: 7105 Comm: syz.0.83 Not tainted 6.15.0-rc1-syzkaller-g2fe2b96c3818 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x198/0x550 mm/kasan/report.c:521 kasan_report+0xd8/0x138 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x268/0x2a8 mm/kasan/generic.c:189 __asan_memcpy+0x54/0x84 mm/kasan/shadow.c:106 memcpy_from_page include/linux/highmem.h:423 [inline] hfs_bnode_read+0x134/0x1c0 fs/hfs/bnode.c:35 hfs_bnode_read_key+0x154/0x21c fs/hfs/bnode.c:70 hfs_brec_insert+0x620/0x97c fs/hfs/brec.c:159 hfs_cat_create+0x348/0x668 fs/hfs/catalog.c:118 hfs_create+0x70/0xe4 fs/hfs/dir.c:202 lookup_open fs/namei.c:3666 [inline] open_last_lookups fs/namei.c:3765 [inline] path_openat+0x13ec/0x2b1c fs/namei.c:4001 do_filp_open+0x1e8/0x404 fs/namei.c:4031 do_sys_openat2+0x120/0x1b8 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __arm64_sys_openat+0x1f0/0x244 fs/open.c:1455 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 7105: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:562 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4331 [inline] __kmalloc_noprof+0x32c/0x54c mm/slub.c:4343 kmalloc_noprof include/linux/slab.h:909 [inline] hfs_find_init+0x88/0x1c8 fs/hfs/bfind.c:21 hfs_cat_create+0x164/0x668 fs/hfs/catalog.c:96 hfs_create+0x70/0xe4 fs/hfs/dir.c:202 lookup_open fs/namei.c:3666 [inline] open_last_lookups fs/namei.c:3765 [inline] path_openat+0x13ec/0x2b1c fs/namei.c:4001 do_filp_open+0x1e8/0x404 fs/namei.c:4031 do_sys_openat2+0x120/0x1b8 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __arm64_sys_openat+0x1f0/0x244 fs/open.c:1455 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the object at ffff0000d7cbfe00 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of allocated 78-byte region [ffff0000d7cbfe00, ffff0000d7cbfe4e) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x117cbf flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000000 ffff0000c0001280 fffffdffc359a180 dead000000000008 raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d7cbfd00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff0000d7cbfd80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff0000d7cbfe00: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff0000d7cbfe80: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff0000d7cbff00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ==================================================================