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 ffff0000c74119c0 by task syz.0.16/7453 CPU: 0 UID: 0 PID: 7453 Comm: syz.0.16 Not tainted 6.15.0-rc6-syzkaller-ga82e92598ab1 #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+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x254 mm/kasan/report.c:408 print_report+0x68/0x84 mm/kasan/report.c:521 kasan_report+0xb0/0x110 mm/kasan/report.c:634 __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:4103 __generic_file_write_iter+0xfc/0x204 mm/filemap.c:4220 generic_file_write_iter+0x104/0x470 mm/filemap.c:4246 __kernel_write_iter+0x2b8/0x6c8 fs/read_write.c:617 dump_emit_page fs/coredump.c:885 [inline] dump_user_range+0x3e4/0x8c0 fs/coredump.c:959 elf_core_dump+0x2958/0x2f40 fs/binfmt_elf.c:2128 do_coredump+0x17e8/0x22c0 fs/coredump.c:759 get_signal+0xe38/0x12f8 kernel/signal.c:3019 do_signal+0x1c0/0x4438 arch/arm64/kernel/signal.c:1615 do_notify_resume+0xac/0x1ec arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_da+0xc0/0x160 arch/arm64/kernel/entry-common.c:628 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:789 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 7453: 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:4327 [inline] __kmalloc_noprof+0x2fc/0x4c8 mm/slub.c:4339 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:4103 __generic_file_write_iter+0xfc/0x204 mm/filemap.c:4220 generic_file_write_iter+0x104/0x470 mm/filemap.c:4246 __kernel_write_iter+0x2b8/0x6c8 fs/read_write.c:617 dump_emit_page fs/coredump.c:885 [inline] dump_user_range+0x3e4/0x8c0 fs/coredump.c:959 elf_core_dump+0x2958/0x2f40 fs/binfmt_elf.c:2128 do_coredump+0x17e8/0x22c0 fs/coredump.c:759 get_signal+0xe38/0x12f8 kernel/signal.c:3019 do_signal+0x1c0/0x4438 arch/arm64/kernel/signal.c:1615 do_notify_resume+0xac/0x1ec arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_da+0xc0/0x160 arch/arm64/kernel/entry-common.c:628 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:789 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the object at ffff0000c7411900 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 [ffff0000c7411900, ffff0000c7411990) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107411 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000000 ffff0000c00013c0 fffffdffc31e5f00 dead000000000004 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c7411880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff0000c7411900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000c7411980: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000c7411a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000c7411a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ WARNING: CPU: 0 PID: 7453 at ./include/linux/mm.h:2345 rcu_read_unlock_sched include/linux/rcupdate.h:955 [inline] WARNING: CPU: 0 PID: 7453 at ./include/linux/mm.h:2345 pfn_valid include/linux/mmzone.h:2119 [inline] WARNING: CPU: 0 PID: 7453 at ./include/linux/mm.h:2345 lowmem_page_address include/linux/mm.h:2345 [inline] WARNING: CPU: 0 PID: 7453 at ./include/linux/mm.h:2345 kmap_local_page+0x370/0x4ec include/linux/highmem-internal.h:180 Modules linked in: CPU: 0 UID: 0 PID: 7453 Comm: syz.0.16 Tainted: G B 6.15.0-rc6-syzkaller-ga82e92598ab1 #0 PREEMPT Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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:180 lr : pfn_valid include/linux/mmzone.h:2114 [inline] lr : lowmem_page_address include/linux/mm.h:2345 [inline] lr : kmap_local_page+0x148/0x4ec include/linux/highmem-internal.h:180 sp : ffff80009e0e60b0 x29: ffff80009e0e60b0 x28: 1ffff00013c1cc20 x27: dfff800000000000 x26: ffff80008ec1d000 x25: 1ffff00011d83a2f x24: dfff800000000000 x23: 000005e741001d1d x22: 0000000000200000 x21: 0000000000000000 x20: 00000000002f3a08 x19: 000000179d040074 x18: 1fffe0003386aa76 x17: 0000000000000000 x16: ffff80008adb97d4 x15: 0000000000000001 x14: 1ffff000125536fc x13: 0000000000000000 x12: 0000000000000000 x11: ffff7000125536fd x10: 0000000000ff0100 x9 : 0000000000000000 x8 : ffff0000c661bd00 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80009e0e5978 x4 : ffff80008f415b40 x3 : ffff8000803b70c0 x2 : 0000000000000001 x1 : 0000000000200000 x0 : 00000000002f3a08 Call trace: rcu_read_unlock_sched include/linux/rcupdate.h:955 [inline] (P) pfn_valid include/linux/mmzone.h:2119 [inline] (P) lowmem_page_address include/linux/mm.h:2345 [inline] (P) kmap_local_page+0x370/0x4ec include/linux/highmem-internal.h:180 (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:4103 __generic_file_write_iter+0xfc/0x204 mm/filemap.c:4220 generic_file_write_iter+0x104/0x470 mm/filemap.c:4246 __kernel_write_iter+0x2b8/0x6c8 fs/read_write.c:617 dump_emit_page fs/coredump.c:885 [inline] dump_user_range+0x3e4/0x8c0 fs/coredump.c:959 elf_core_dump+0x2958/0x2f40 fs/binfmt_elf.c:2128 do_coredump+0x17e8/0x22c0 fs/coredump.c:759 get_signal+0xe38/0x12f8 kernel/signal.c:3019 do_signal+0x1c0/0x4438 arch/arm64/kernel/signal.c:1615 do_notify_resume+0xac/0x1ec arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_da+0xc0/0x160 arch/arm64/kernel/entry-common.c:628 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:789 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 irq event stamp: 14007 hardirqs last enabled at (14007): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1525 [inline] hardirqs last enabled at (14007): [] finish_lock_switch+0xb0/0x1c0 kernel/sched/core.c:5130 hardirqs last disabled at (14006): [] __schedule+0x318/0x28d4 kernel/sched/core.c:6671 softirqs last enabled at (12400): [] softirq_handle_end kernel/softirq.c:425 [inline] softirqs last enabled at (12400): [] handle_softirqs+0xaf8/0xc88 kernel/softirq.c:607 softirqs last disabled at (12381): [] __do_softirq+0x14/0x20 kernel/softirq.c:613 ---[ end trace 0000000000000000 ]--- Unable to handle kernel paging request at virtual address fffd8f3a0000eac8 KASAN: maybe wild-memory-access in range [0xfff079d000075640-0xfff079d000075647] Mem abort info: ESR = 0x00000000960 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=00000002079f8000 [fffd8f3a0000eac8] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] SMP Modules linked in: CPU: 0 UID: 0 PID: 7453 Comm: syz.0.16 Tainted: G B W 6.15.0-rc6-syzkaller-ga82e92598ab1 #0 PREEMPT Tainted: [B]=BAD_PAGE, [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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 : ffff80009e0e6100 x29: ffff80009e0e6160 x28: 1ffff00013c1cc20 x27: dfff800000000000 x26: fff079d000075640 x25: 0000000000000f00 x24: 00000000ffff90f8 x23: fff079d000074740 x22: ffff0000c74119c0 x21: 0000000000000000 x20: ffff0000c7411900 x19: ffff0000cd01e000 x18: 1fffe0003386aa76 x17: 0000000000000000 x16: ffff80008adb97d4 x15: 0000000000000001 x14: 1ffff000125536fc x13: 0000000000000000 x12: 0000000000000000 x11: ffff7000125536fd x10: 0000000000ff0100 x9 : 0000000000000000 x8 : 1ffe0f3a0000eac8 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80009e0e5978 x4 : ffff80008f415b40 x3 : ffff8000803b70c0 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:4103 __generic_file_write_iter+0xfc/0x204 mm/filemap.c:4220 generic_file_write_iter+0x104/0x470 mm/filemap.c:4246 __kernel_write_iter+0x2b8/0x6c8 fs/read_write.c:617 dump_emit_page fs/coredump.c:885 [inline] dump_user_range+0x3e4/0x8c0 fs/coredump.c:959 elf_core_dump+0x2958/0x2f40 fs/binfmt_elf.c:2128 do_coredump+0x17e8/0x22c0 fs/coredump.c:759 get_signal+0xe38/0x12f8 kernel/signal.c:3019 do_signal+0x1c0/0x4438 arch/arm64/kernel/signal.c:1615 do_notify_resume+0xac/0x1ec arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_da+0xc0/0x160 arch/arm64/kernel/entry-common.c:628 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:789 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 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