================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x98/0x1a8 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff0000d59575c0 by task syz.2.96/7140 CPU: 1 UID: 0 PID: 7140 Comm: syz.2.96 Not tainted 6.15.0-rc2-syzkaller-gc72692105976 #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_bnode_read+0x98/0x1a8 fs/hfsplus/bnode.c:32 hfsplus_bnode_dump+0x274/0x384 fs/hfsplus/bnode.c:-1 hfsplus_brec_remove+0x3cc/0x4a0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x198/0x33c fs/hfsplus/attributes.c:299 hf hfsplus_delete_all_attrs+0x228/0x390 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x82c/0xbb0 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x2a8/0x63c fs/hfsplus/dir.c:385 hfsplus_rename+0xd0/0x1b0 fs/hfsplus/dir.c:547 vfs_rename+0x8e8/0xc80 fs/namei.c:5086 do_renameat2+0x664/0x918 fs/namei.c:5235 __do_sys_renameat2 fs/namei.c:5269 [inline] __se_sys_renameat2 fs/namei.c:5266 [inline] __arm64_sys_renameat2+0xd8/0xf4 fs/namei.c:5266 __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+0x58/0x150 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 7140: 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:4331 [inline] __kmalloc_noprof+0x2fc/0x4c8 mm/slub.c:4343 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:409 hfsplus_bnode_find+0x1f0/0xb5c fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x128/0x448 fs/hfsplus/bfind.c:172 hfsplus_find_attr+0x164/0x234 fs/hfsplus/attributes.c:-1 __hfsplus_getxattr+0x2a0/0x6c4 fs/hfsplus/xattr.c:520 hfsplus_getxattr+0x100/0x168 fs/hfsplus/xattr.c:588 hfsplus_security_getxattr+0x48/0x5c fs/hfsplus/xattr_security.c:20 __vfs_getxattr+0x394/0x3c0 fs/xattr.c:423 smk_fetch+0xc4/0x150 security/smack/smack_lsm.c:290 smack_d_instantiate+0x53c/0x7a4 security/smack/smack_lsm.c:3607 security_d_instantiate+0x100/0x204 security/security.c:4079 d_splice_alias+0x70/0x31c fs/dcache.c:2989 hfsplus_lookup+0x6b4/0x728 fs/hfsplus/dir.c:124 lookup_open fs/namei.c:3644 [inline] open_last_lookups fs/namei.c:3765 [inline] path_openat+0xcc0/0x2c40 fs/namei.c:4001 do_filp_open+0x18c/0x36c fs/namei.c:4031 do_sys_openat2+0x11c/0x1b4 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+0x120/0x158 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+0x58/0x150 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/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 ffff0000d5957500 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 40 bytes to the right of allocated 152-byte region [ffff0000d5957500, ffff0000d5957598) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x115957 ksm flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000000 ffff0000c00013c0 fffffdffc357ed40 dead000000000003 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d5957480: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ffff0000d5957500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000d5957580: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000d5957600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000d5957680: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ WARNING: CPU: 0 PID: 7140 at ./include/linux/mm.h:2328 rcu_read_unlock_sched include/linux/rcupdate.h:955 [inline] WARNING: CPU: 0 PID: 7140 at ./include/linux/mm.h:2328 pfn_valid include/linux/mmzone.h:2118 [inline] WARNING: CPU: 0 PID: 7140 at ./include/linux/mm.h:2328 lowmem_page_address include/linux/mm.h:2328 [inline] WARNING: CPU: 0 PID: 7140 at ./include/linux/mm.h:2328 kmap_local_page+0x370/0x4ec include/linux/highmem-internal.h:180 Modules linked in: CPU: 0 UID: 0 PID: 7140 Comm: syz.2.96 Tainted: G B 6.15.0-rc2-syzkaller-gc72692105976 #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:2110 [inline] lr : lowmem_page_address include/linux/mm.h:2328 [inline] lr : kmap_local_page+0x140/0x4ec include/linux/highmem-internal.h:180 sp : ffff8000a17e7250 x29: ffff8000a17e7250 x28: 0000000000000232 x27: 0000000000007232 x26: ffff80008ebf3000 x25: 1ffff00011d7e7bf x24: dfff800000000000 x23: 0770060341001be4 x22: 0000000000000002 x21: 0000000000000002 x20: ffff0000d5957500 x19: 001dc0180d04006f x18: 1fffe0003670dab6 x17: 0000000000000000 x16: ffff80008ad9af48 x15: 0000000000000001 x14: 1ffff0001254acf0 x13: 0000000000000000 x12: 0000000000000000 x11: ffff70001254acf1 x10: 0000000000ff0100 x9 : 0000000000000000 x8 : ffff0000d2f9db80 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000a17e6b18 x4 : ffff80008f3d4f00 x3 : ffff8000803af0c0 x2 : 0000000000000001 x1 : 001dc0180d04006f x0 : 0010000000000000 Call trace: rcu_read_unlock_sched include/linux/rcupdate.h:955 [inline] (P) pfn_valid include/linux/mmzone.h:2118 [inline] (P) lowmem_page_address include/linux/mm.h:2328 [inline] (P) kmap_local_page+0x370/0x4ec include/linux/highmem-internal.h:180 (P) memcpy_from_page include/linux/highmem.h:420 [inline] hfsplus_bnode_read+0xa4/0x1a8 fs/hfsplus/bnode.c:32 hfsplus_bnode_dump+0x274/0x384 fs/hfsplus/bnode.c:-1 hfsplus_brec_remove+0x3cc/0x4a0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x198/0x33c fs/hfsplus/attributes.c:299 hfsplus_delete_all_attrs+0x228/0x390 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x82c/0xbb0 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x2a8/0x63c fs/hfsplus/dir.c:385 hfsplus_rename+0xd0/0x1b0 fs/hfsplus/dir.c:547 vfs_rename+0x8e8/0xc80 fs/namei.c:5086 do_renameat2+0x664/0x918 fs/namei.c:5235 __do_sys_renameat2 fs/namei.c:5269 [inline] __se_sys_renameat2 fs/namei.c:5266 [inline] __arm64_sys_renameat2+0xd8/0xf4 fs/namei.c:5266 __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+0x58/0x150 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 irq event stamp: 6639 hardirqs last enabled at (6639): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1525 [inline] hardirqs last enabled at (6639): [] finish_lock_switch+0xb0/0x1c0 kernel/sched/core.c:5130 hardirqs last disabled at (6638): [] __schedule+0x318/0x28d4 kernel/sched/core.c:6671 softirqs last enabled at (6094): [] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32 softirqs last disabled at (6092): [] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19 ---[ end trace 0000000000000000 ]--- Unable to handle kernel paging request at virtual address fff080d00006fb32 KASAN: maybe wild-memory-access in range [0xff8806800037d990-0xff8806800037d997] 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=00000001a5dcf000 [fff080d00006fb32] pgd=180000023ffff403, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] SMP Modules linked in: CPU: 1 UID: 0 PID: 7140 Comm: syz.2.96 Tainted: G B W 6.15.0-rc2-syzkaller-gc72692105976 #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 : __pi_memcpy_generic+0x70/0x22c arch/arm64/lib/memcpy.S:100 lr : __asan_memcpy+0x68/0x84 mm/kasan/shadow.c:109 sp : ffff8000a17e7270 x29: ffff8000a17e7270 x28: 0000000000000232 x27: 0000000000007232 x26: 0000000000000002 x25: dfff800000000000 x24: 0000000000000234 x23: fff080d00006f900 x22: ffff80008127b2cc x21: ffff8000a17e7340 x20: fff080d00006fb32 x19: 0000000000000002 x18: 1fffe0003670dab6 x17: 0000000000000000 x16: ffff80008ad9af48 x15: ffff7000142fce68 x14: 0000000000000001 x13: 0000000000000002 x12: ffffffffffffffff x11: ffff7000142fce68 x10: dfff800000000000 x9 : 0000000000000002 x8 : 0000000000000001 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000a17e7342 x4 : fff080d00006fb34 x3 : ffff80008127b2cc x2 : 0000000000000002 x1 : fff080d00006fb32 x0 : ffff8000a17e7340 Call trace: __pi_memcpy_generic+0x70/0x22c arch/arm64/lib/memcpy.S:99 (P) memcpy_from_page include/linux/highmem.h:423 [inline] hfsplus_bnode_read+0xd0/0x1a8 fs/hfsplus/bnode.c:32 hfsplus_bnode_dump+0x274/0x384 fs/hfsplus/bnode.c:-1 hfsplus_brec_remove+0x3cc/0x4a0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x198/0x33c fs/hfsplus/attributes.c:299 hfsplus_delete_all_attrs+0x228/0x390 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x82c/0xbb0 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x2a8/0x63c fs/hfsplus/dir.c:385 hfsplus_rename+0xd0/0x1b0 fs/hfsplus/dir.c:547 vfs_rename+0x8e8/0xc80 fs/namei.c:5086 do_renameat2+0x664/0x918 fs/namei.c:5235 __do_sys_renameat2 fs/namei.c:5269 [inline] __se_sys_renameat2 fs/namei.c:5266 [inline] __arm64_sys_renameat2+0xd8/0xf4 fs/namei.c:5266 __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+0x58/0x150 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Code: b81fc0a8 d65f03c0 b4000102 d341fc4e (39400026) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: b81fc0a8 stur w8, [x5, #-4] 4: d65f03c0 ret 8: b4000102 cbz x2, 0x28 c: d341fc4e lsr x14, x2, #1 * 10: 39400026 ldrb w6, [x1] <-- trapping instruction