loop0: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bmap_alloc+0x130/0x4cc fs/hfsplus/btree.c:-1 Read of size 8 at addr ffff0000c622f1c0 by task syz.0.16/7480 CPU: 0 UID: 0 PID: 7480 Comm: syz.0.16 Not tainted 6.16.0-rc7-syzkaller-g82af5ea7c611 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x220 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:480 kasan_report+0xb0/0x110 mm/kasan/report.c:593 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 hfsplus_bmap_alloc+0x130/0x4cc fs/hfsplus/btree.c:-1 hfs_btree_inc_height+0xf8/0x8e0 fs/hfsplus/brec.c:475 hfsplus_brec_insert+0x108/0xaa8 fs/hfsplus/brec.c:75 __hfsplus_ext_write_extent+0x278/0x4cc fs/hfsplus/extents.c:107 __hfsplus_ext_cache_extent+0x84/0xa88 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x37c/0x1388 fs/hfsplus/extents.c:462 hfsplus_get_block+0x314/0x1154 fs/hfsplus/extents.c:245 __block_write_begin_int+0x53c/0x15e8 fs/buffer.c:2151 block_write_begin fs/buffer.c:2262 [inline] cont_write_begin+0x62c/0x968 fs/buffer.c:2601 hfsplus_write_begin+0x7c/0xc4 fs/hfsplus/inode.c:46 generic_perform_write+0x23c/0x79c mm/filemap.c:4112 __generic_file_write_iter+0xfc/0x204 mm/filemap.c:4229 generic_file_write_iter+0x104/0x470 mm/filemap.c:4255 __kernel_write_iter+0x2b8/0x6c8 fs/read_write.c:619 dump_emit_page fs/coredump.c:1112 [inline] dump_user_range+0x3e4/0x8c0 fs/coredump.c:1186 elf_core_dump+0x2958/0x2f40 fs/binfmt_elf.c:2075 do_coredump+0x1fc0/0x2b54 fs/coredump.c:950 get_signal+0xe38/0x12f8 kernel/signal.c:3019 do_signal+0x1c0/0x4434 arch/arm64/kernel/signal.c:1618 do_notify_resume+0xb0/0x1f4 arch/arm64/kernel/entry-common.c:152 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:173 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:182 [inline] el0_da+0xc4/0x164 arch/arm64/kernel/entry-common.c:698 el0t_64_sync_handler+0x90/0x12c arch/arm64/kernel/entry-common.c:901 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Allocated by task 7480: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:562 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4328 [inline] __kmalloc_noprof+0x2fc/0x4c8 mm/slub.c:4340 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] __hfs_bnode_create+0xe0/0x6f4 fs/hfsplus/bnode.c:415 hfsplus_bnode_find+0x1f0/0xb5c fs/hfsplus/bnode.c:492 hfsplus_bmap_alloc+0xb8/0x4cc fs/hfsplus/btree.c:390 hfs_btree_inc_height+0xf8/0x8e0 fs/hfsplus/brec.c:475 hfsplus_brec_insert+0x108/0xaa8 fs/hfsplus/brec.c:75 __hfsplus_ext_write_extent+0x278/0x4cc fs/hfsplus/extents.c:107 __hfsplus_ext_cache_extent+0x84/0xa88 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x37c/0x1388 fs/hfsplus/extents.c:462 hfsplus_get_block+0x314/0x1154 fs/hfsplus/extents.c:245 __block_write_begin_int+0x53c/0x15e8 fs/buffer.c:2151 block_write_begin fs/buffer.c:2262 [inline] cont_write_begin+0x62c/0x968 fs/buffer.c:2601 hfsplus_write_begin+0x7c/0xc4 fs/hfsplus/inode.c:46 generic_perform_write+0x23c/0x79c mm/filemap.c:4112 __generic_file_write_iter+0xfc/0x204 mm/filemap.c:4229 generic_file_write_iter+0x104/0x470 mm/filemap.c:4255 __kernel_write_iter+0x2b8/0x6c8 fs/read_write.c:619 dump_emit_page fs/coredump.c:1112 [inline] dump_user_range+0x3e4/0x8c0 fs/coredump.c:1186 elf_core_dump+0x2958/0x2f40 fs/binfmt_elf.c:2075 do_coredump+0x1fc0/0x2b54 fs/coredump.c:950 get_signal+0xe38/0x12f8 kernel/signal.c:3019 do_signal+0x1c0/0x4434 arch/arm64/kernel/signal.c:1618 do_notify_resume+0xb0/0x1f4 arch/arm64/kernel/entry-common.c:152 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:173 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:182 [inline] el0_da+0xc4/0x164 arch/arm64/kernel/entry-common.c:698 el0t_64_sync_handler+0x90/0x12c arch/arm64/kernel/entry-common.c:901 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 The buggy address belongs to the object at ffff0000c622f100 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 48 bytes to the right of allocated 144-byte region [ffff0000c622f100, ffff0000c622f190) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10622f flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000000 ffff0000c00013c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c622f080: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c622f100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000c622f180: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000c622f200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000c622f280: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ WARNING: CPU: 0 PID: 7480 at ./include/linux/mm.h:2206 rcu_read_unlock_sched include/linux/rcupdate.h:955 [inline] WARNING: CPU: 0 PID: 7480 at ./include/linux/mm.h:2206 pfn_valid include/linux/mmzone.h:2160 [inline] WARNING: CPU: 0 PID: 7480 at ./include/linux/mm.h:2206 lowmem_page_address include/linux/mm.h:2206 [inline] WARNING: CPU: 0 PID: 7480 at ./include/linux/mm.h:2206 kmap_local_page+0x370/0x4ec include/linux/highmem-internal.h:188 Modules linked in: CPU: 0 UID: 0 PID: 7480 Comm: syz.0.16 Tainted: G B 6.16.0-rc7-syzkaller-g82af5ea7c611 #0 PREEMPT Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : lowmem_page_address include/linux/rcupdate.h:955 [inline] pc : kmap_local_page+0x370/0x4ec include/linux/highmem-internal.h:188 lr : pfn_valid include/linux/mmzone.h:2155 [inline] lr : lowmem_page_address include/linux/mm.h:2206 [inline] lr : kmap_local_page+0x148/0x4ec include/linux/highmem-internal.h:188 sp : ffff80009c6a5f90 x29: ffff80009c6a5f90 x28: 1ffff000138d4bfc x27: dfff800000000000 x26: ffff80008ef79000 x25: 1ffff00011def38c x24: dfff800000000000 x23: 001c05eb41001d38 x22: 0000000000200000 x21: 0000000000000000 x20: 00000000e02f5a08 x19: 00007017ad040074 x18: 1fffe000337d1c76 x17: 0000000000000000 x16: ffff80008ae69508 x15: 0000000000000001 x14: 1ffff000125db6f4 x13: 0000000000000000 x12: 0000000000000000 x11: ffff7000125db6f5 x10: 0000000000ff0100 x9 : 0000000000000000 x8 : ffff0000d28f5b80 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80009c6a5858 x4 : ffff80008f776bc0 x3 : ffff8000803b7030 x2 : 0000000000000001 x1 : 0000000000200000 x0 : 00000000e02f5a08 Call trace: rcu_read_unlock_sched include/linux/rcupdate.h:955 [inline] (P) pfn_valid include/linux/mmzone.h:2160 [inline] (P) lowmem_page_address include/linux/mm.h:2206 [inline] (P) kmap_local_page+0x370/0x4ec include/linux/highmem-internal.h:188 (P) hfsplus_bmap_alloc+0x138/0x4cc fs/hfsplus/btree.c:-1 hfs_btree_inc_height+0xf8/0x8e0 fs/hfsplus/brec.c:475 hfsplus_brec_insert+0x108/0xaa8 fs/hfsplus/brec.c:75 __hfsplus_ext_write_extent+0x278/0x4cc fs/hfsplus/extents.c:107 __hfsplus_ext_cache_extent+0x84/0xa88 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x37c/0x1388 fs/hfsplus/extents.c:462 hfsplus_get_block+0x314/0x1154 fs/hfsplus/extents.c:245 __block_write_begin_int+0x53c/0x15e8 fs/buffer.c:2151 block_write_begin fs/buffer.c:2262 [inline] cont_write_begin+0x62c/0x968 fs/buffer.c:2601 hfsplus_write_begin+0x7c/0xc4 fs/hfsplus/inode.c:46 generic_perform_write+0x23c/0x79c mm/filemap.c:4112 __generic_file_write_iter+0xfc/0x204 mm/filemap.c:4229 generic_file_write_iter+0x104/0x470 mm/filemap.c:4255 __kernel_write_iter+0x2b8/0x6c8 fs/read_write.c:619 dump_emit_page fs/coredump.c:1112 [inline] dump_user_range+0x3e4/0x8c0 fs/coredump.c:1186 elf_core_dump+0x2958/0x2f40 fs/binfmt_elf.c:2075 do_coredump+0x1fc0/0x2b54 fs/coredump.c:950 get_signal+0xe38/0x12f8 kernel/signal.c:3019 do_signal+0x1c0/0x4434 arch/arm64/kernel/signal.c:1618 do_notify_resume+0xb0/0x1f4 arch/arm64/kernel/entry-common.c:152 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:173 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:182 [inline] el0_da+0xc4/0x164 arch/arm64/kernel/entry-common.c:698 el0t_64_sync_handler+0x90/0x12c arch/arm64/kernel/entry-common.c:901 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 irq event stamp: 13431 hardirqs last enabled at (13431): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1544 [inline] hardirqs last enabled at (13431): [] finish_lock_switch+0xb0/0x1c0 kernel/sched/core.c:5145 hardirqs last disabled at (13430): [] __schedule+0x320/0x2a14 kernel/sched/core.c:6690 softirqs last enabled at (11494): [] softirq_handle_end kernel/softirq.c:425 [inline] softirqs last enabled at (11494): [] handle_softirqs+0xaf8/0xc88 kernel/softirq.c:607 softirqs last disabled at (11373): [] __do_softirq+0x14/0x20 kernel/softirq.c:613 ---[ end trace 0000000000000000 ]--- Unable to handle kernel paging request at virtual address fffd8f5a0000eba0 KASAN: maybe wild-memory-access in range [0xfff07ad000075d00-0xfff07ad000075d07] Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000207157000 [fffd8f5a0000eba0] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] SMP Modules linked in: CPU: 0 UID: 0 PID: 7480 Comm: syz.0.16 Tainted: G B W 6.16.0-rc7-syzkaller-g82af5ea7c611 #0 PREEMPT Tainted: [B]=BAD_PAGE, [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : hfsplus_bmap_alloc+0x164/0x4cc fs/hfsplus/btree.c:404 lr : hfsplus_bmap_alloc+0x14c/0x4cc fs/hfsplus/btree.c:403 sp : ffff80009c6a5fe0 x29: ffff80009c6a6040 x28: 1ffff000138d4bfc x27: dfff800000000000 x26: fff07ad000075d00 x25: 0000000000000f00 x24: 00000000ffff90f8 x23: fff07ad000074e00 x22: ffff0000c622f1c0 x21: 0000000000000000 x20: ffff0000c622f100 x19: ffff0000d95d6000 x18: 1fffe000337d1c76 x17: 0000000000000000 x16: ffff80008ae69508 x15: 0000000000000001 x14: 1ffff000125db6f4 x13: 0000000000000000 x12: 0000000000000000 x11: ffff7000125db6f5 x10: 0000000000ff0100 x9 : 0000000000000000 x8 : 1ffe0f5a0000eba0 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80009c6a5858 x4 : ffff80008f776bc0 x3 : ffff8000803b7030 x2 : 0000000000000001 x1 : 00000000000090f8 x0 : 0000000000000000 Call trace: hfsplus_bmap_alloc+0x164/0x4cc fs/hfsplus/btree.c:404 (P) hfs_btree_inc_height+0xf8/0x8e0 fs/hfsplus/brec.c:475 hfsplus_brec_insert+0x108/0xaa8 fs/hfsplus/brec.c:75 __hfsplus_ext_write_extent+0x278/0x4cc fs/hfsplus/extents.c:107 __hfsplus_ext_cache_extent+0x84/0xa88 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x37c/0x1388 fs/hfsplus/extents.c:462 hfsplus_get_block+0x314/0x1154 fs/hfsplus/extents.c:245 __block_write_begin_int+0x53c/0x15e8 fs/buffer.c:2151 block_write_begin fs/buffer.c:2262 [inline] cont_write_begin+0x62c/0x968 fs/buffer.c:2601 hfsplus_write_begin+0x7c/0xc4 fs/hfsplus/inode.c:46 generic_perform_write+0x23c/0x79c mm/filemap.c:4112 __generic_file_write_iter+0xfc/0x204 mm/filemap.c:4229 generic_file_write_iter+0x104/0x470 mm/filemap.c:4255 __kernel_write_iter+0x2b8/0x6c8 fs/read_write.c:619 dump_emit_page fs/coredump.c:1112 [inline] dump_user_range+0x3e4/0x8c0 fs/coredump.c:1186 elf_core_dump+0x2958/0x2f40 fs/binfmt_elf.c:2075 do_coredump+0x1fc0/0x2b54 fs/coredump.c:950 get_signal+0xe38/0x12f8 kernel/signal.c:3019 do_signal+0x1c0/0x4434 arch/arm64/kernel/signal.c:1618 do_notify_resume+0xb0/0x1f4 arch/arm64/kernel/entry-common.c:152 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:173 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:182 [inline] el0_da+0xc4/0x164 arch/arm64/kernel/entry-common.c:698 el0t_64_sync_handler+0x90/0x12c arch/arm64/kernel/entry-common.c:901 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Code: 2a1903f9 8b1902fa d343ff48 12000b49 (38fb6908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 2a1903f9 mov w25, w25 4: 8b1902fa add x26, x23, x25 8: d343ff48 lsr x8, x26, #3 c: 12000b49 and w9, w26, #0x7 * 10: 38fb6908 ldrsb w8, [x8, x27] <-- trapping instruction