hfsplus: request for non-existent node 128 in B*Tree hfsplus: request for non-existent node 128 in B*Tree ================================================================== BUG: KASAN: use-after-free in memcpy_from_page include/linux/highmem.h:393 [inline] BUG: KASAN: use-after-free in hfsplus_bnode_read fs/hfsplus/bnode.c:32 [inline] BUG: KASAN: use-after-free in hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:45 [inline] BUG: KASAN: use-after-free in hfsplus_bnode_dump+0x3f0/0xa50 fs/hfsplus/bnode.c:305 Read of size 2 at addr ffff00000000103e by task syz.4.212/5558 CPU: 1 PID: 5558 Comm: syz.4.212 Not tainted 6.1.119-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:395 kasan_report+0xd4/0x130 mm/kasan/report.c:495 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:189 memcpy+0x48/0x90 mm/kasan/shadow.c:65 memcpy_from_page include/linux/highmem.h:393 [inline] hfsplus_bnode_read fs/hfsplus/bnode.c:32 [inline] hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:45 [inline] hfsplus_bnode_dump+0x3f0/0xa50 fs/hfsplus/bnode.c:305 hfsplus_brec_remove+0x3d0/0x4a4 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x1dc/0x3e4 fs/hfsplus/attributes.c:299 hfsplus_delete_all_attrs+0x214/0x348 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x9a4/0xd6c fs/hfsplus/catalog.c:425 hfsplus_unlink+0x2c0/0x6a0 fs/hfsplus/dir.c:385 vfs_unlink+0x2f0/0x508 fs/namei.c:4322 do_unlinkat+0x4cc/0x70c fs/namei.c:4390 __do_sys_unlinkat fs/namei.c:4433 [inline] __se_sys_unlinkat fs/namei.c:4426 [inline] __arm64_sys_unlinkat+0xcc/0xfc fs/namei.c:4426 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the physical page: page:000000001f324b34 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x40001 flags: 0x1ffc00000000000(node=0|zone=0|lastcpupid=0x7ff) raw: 01ffc00000000000 fffffc0000000048 fffffc0000000048 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000000000f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff000000000f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff000000001000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff000000001080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff000000001100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Unable to handle kernel paging request at virtual address ffff60062716c57f KASAN: maybe wild-memory-access in range [0xffff003138b62bf8-0xffff003138b62bff] Mem abort info: ESR = 0x0000000096000005 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x05: level 1 translation fault Data abort info: ISV = 0, ISS = 0x00000005 CM = 0, WnR = 0 swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000001ab212000 [ffff60062716c57f] pgd=0000000233e76003, p4d=0000000233e76003, pud=0000000000000000 Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 5558 Comm: syz.4.212 Tainted: G B 6.1.119-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : bytes_is_nonzero mm/kasan/generic.c:85 [inline] pc : memory_is_nonzero mm/kasan/generic.c:102 [inline] pc : memory_is_poisoned_n mm/kasan/generic.c:128 [inline] pc : memory_is_poisoned mm/kasan/generic.c:159 [inline] pc : check_region_inline mm/kasan/generic.c:180 [inline] pc : kasan_check_range+0x64/0x2a4 mm/kasan/generic.c:189 lr : memcpy+0x48/0x90 mm/kasan/shadow.c:65 sp : ffff800022d373c0 x29: ffff800022d373c0 x28: 0000000000000002 x27: fffffbffff000000 x26: 0000000000000000 x25: ffff0000c4e2d878 x24: ffff0000c4e2d81a x23: 00000000ffffeffe x22: ffff8000090892dc x21: ffff800022d374b0 x20: ffff003138b62bfe x19: 0000000000000002 x18: 1fffe0003679c376 x17: 0000000000000000 x16: ffff800012272b80 x15: 0000000000000000 x14: 00000000000000ff x13: ffff0000d8948000 x12: 0000000000000001 x11: 1fffe0062716c57f x10: 1fffe0062716c57f x9 : ffffffffffffffff x8 : ffff60062716c57f x7 : 0000000000000001 x6 : 0000000000000000 x5 : ffff800022d374b2 x4 : ffff000000000042 x3 : ffff8000090892dc x2 : 0000000000000000 x1 : 0000000000000002 x0 : ffff003138b62bfe Call trace: bytes_is_nonzero mm/kasan/generic.c:84 [inline] memory_is_nonzero mm/kasan/generic.c:102 [inline] memory_is_poisoned_n mm/kasan/generic.c:128 [inline] memory_is_poisoned mm/kasan/generic.c:159 [inline] check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x64/0x2a4 mm/kasan/generic.c:189 memcpy+0x48/0x90 mm/kasan/shadow.c:65 memcpy_from_page include/linux/highmem.h:393 [inline] hfsplus_bnode_read fs/hfsplus/bnode.c:32 [inline] hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:45 [inline] hfsplus_bnode_dump+0x3f0/0xa50 fs/hfsplus/bnode.c:305 hfsplus_brec_remove+0x3d0/0x4a4 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x1dc/0x3e4 fs/hfsplus/attributes.c:299 hfsplus_delete_all_attrs+0x214/0x348 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x9a4/0xd6c fs/hfsplus/catalog.c:425 hfsplus_unlink+0x2c0/0x6a0 fs/hfsplus/dir.c:385 vfs_unlink+0x2f0/0x508 fs/namei.c:4322 do_unlinkat+0x4cc/0x70c fs/namei.c:4390 __do_sys_unlinkat fs/namei.c:4433 [inline] __se_sys_unlinkat fs/namei.c:4426 [inline] __arm64_sys_unlinkat+0xcc/0xfc fs/namei.c:4426 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Code: 5400014c b4000b8c aa2a03e9 8b0b0129 (3940010a) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 5400014c b.gt 0x28 4: b4000b8c cbz x12, 0x174 8: aa2a03e9 mvn x9, x10 c: 8b0b0129 add x9, x9, x11 * 10: 3940010a ldrb w10, [x8] <-- trapping instruction