hfsplus: request for non-existent node 134217728 in B*Tree ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x9c/0x270 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff0000d2326100 by task syz.1.228/5471 CPU: 1 PID: 5471 Comm: syz.1.228 Not tainted 6.1.129-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 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:316 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:427 kasan_report+0xd4/0x130 mm/kasan/report.c:531 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351 hfsplus_bnode_read+0x9c/0x270 fs/hfsplus/bnode.c:32 hfsplus_bnode_dump+0x2ec/0x534 hfsplus_brec_remove+0x3d0/0x4a4 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x1dc/0x3e4 fs/hfsplus/attributes.c:299 hfsplus_delete_attr+0x234/0x2c8 fs/hfsplus/attributes.c:345 __hfsplus_setxattr+0x3b8/0x1d3c fs/hfsplus/xattr.c:342 hfsplus_setxattr+0xdc/0x12c fs/hfsplus/xattr.c:434 hfsplus_trusted_setxattr+0x54/0x6c fs/hfsplus/xattr_trusted.c:30 __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182 __vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:216 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277 vfs_setxattr+0x1a8/0x344 fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x230/0x294 fs/xattr.c:617 path_setxattr+0x17c/0x258 fs/xattr.c:636 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:648 __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 Allocated by task 5470: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xd8/0x1c4 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] kzalloc include/linux/slab.h:699 [inline] __hfs_bnode_create+0xe4/0x6d4 fs/hfsplus/bnode.c:409 hfsplus_bnode_find+0x1f8/0xc60 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x134/0x4a0 fs/hfsplus/bfind.c:172 hfsplus_find_attr+0x13c/0x1e0 hfsplus_attr_exists+0x154/0x1c8 fs/hfsplus/attributes.c:182 __hfsplus_setxattr+0x384/0x1d3c fs/hfsplus/xattr.c:336 hfsplus_setxattr+0xdc/0x12c fs/hfsplus/xattr.c:434 hfsplus_trusted_setxattr+0x54/0x6c fs/hfsplus/xattr_trusted.c:30 __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182 __vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:216 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277 vfs_setxattr+0x1a8/0x344 fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x230/0x294 fs/xattr.c:617 path_setxattr+0x17c/0x258 fs/xattr.c:636 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:648 __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 Last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 call_rcu+0xfc/0xa40 kernel/rcu/tree.c:2845 free_fib_info net/ipv4/fib_semantics.c:257 [inline] fib_info_put include/net/ip_fib.h:583 [inline] fib_release_info+0x544/0x66c net/ipv4/fib_semantics.c:283 fib_table_flush+0x384/0xfdc net/ipv4/fib_trie.c:2098 fib_flush net/ipv4/fib_frontend.c:195 [inline] fib_disable_ip+0xe8/0x178 net/ipv4/fib_frontend.c:1426 fib_netdev_event+0x2fc/0x4b0 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1970 [inline] call_netdevice_notifiers_extack net/core/dev.c:2008 [inline] call_netdevice_notifiers net/core/dev.c:2022 [inline] dev_close_many+0x300/0x46c net/core/dev.c:1570 unregister_netdevice_many+0x3fc/0x1798 net/core/dev.c:10921 default_device_exit_batch+0xa10/0xaa8 net/core/dev.c:11460 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x6b8/0xaec net/core/net_namespace.c:640 process_one_work+0x804/0x1484 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 The buggy address belongs to the object at ffff0000d2326000 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of 256-byte region [ffff0000d2326000, ffff0000d2326100) The buggy address belongs to the physical page: page:00000000a4dd6771 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112326 head:00000000a4dd6771 order:1 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 dead000000000100 dead000000000122 ffff0000c0002480 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d2326000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000d2326080: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000d2326100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000d2326180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d2326200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Unable to handle kernel paging request at virtual address ffff64200000acef KASAN: maybe wild-memory-access in range [0xffff210000056778-0xffff21000005677f] 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 CM = 0, WnR = 0 swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000001ab074000 [ffff64200000acef] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 5471 Comm: syz.1.228 Tainted: G B 6.1.129-syzkaller #0 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 : 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 : ffff800023746df0 x29: ffff800023746df0 x28: 0000000000000001 x27: 0000000040000000 x26: 1ffff00002a9d86b x25: 0000000000000fff x24: 0000000000001000 x23: 0000000000000001 x22: ffff800009084cf0 x21: ffff800023746f00 x20: ffff21000005677f x19: 0000000000000001 x18: 1fffe00036798976 x17: ffff800015aed000 x16: ffff80001232163c x15: ffff0001b3cc4bbc x14: ffff0001b3cc4bb8 x13: 1fffe00036798976 x12: 0000000000000001 x11: 1fffe4200000acef x10: 1fffe4200000acef x9 : ffffffffffffffff x8 : ffff64200000acef x7 : 1fffe00036798977 x6 : ffff800008279314 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800009084cf0 x2 : 0000000000000000 x1 : 0000000000000001 x0 : ffff21000005677f 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+0x134/0x270 fs/hfsplus/bnode.c:32 hfsplus_bnode_dump+0x2ec/0x534 hfsplus_brec_remove+0x3d0/0x4a4 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x1dc/0x3e4 fs/hfsplus/attributes.c:299 hfsplus_delete_attr+0x234/0x2c8 fs/hfsplus/attributes.c:345 __hfsplus_setxattr+0x3b8/0x1d3c fs/hfsplus/xattr.c:342 hfsplus_setxattr+0xdc/0x12c fs/hfsplus/xattr.c:434 hfsplus_trusted_setxattr+0x54/0x6c fs/hfsplus/xattr_trusted.c:30 __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182 __vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:216 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277 vfs_setxattr+0x1a8/0x344 fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x230/0x294 fs/xattr.c:617 path_setxattr+0x17c/0x258 fs/xattr.c:636 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:648 __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