================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x84/0x24c fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff0000db0db300 by task syz.4.47/4321 CPU: 1 PID: 4321 Comm: syz.4.47 Not tainted 5.15.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x174/0x1e4 mm/kasan/report.c:451 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 hfsplus_bnode_read+0x84/0x24c fs/hfsplus/bnode.c:32 hfsplus_bnode_dump+0x2c4/0x4cc hfsplus_brec_remove+0x3d0/0x4a4 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x1e0/0x3ec fs/hfsplus/attributes.c:299 hfsplus_delete_attr+0x2e4/0x41c fs/hfsplus/attributes.c:345 __hfsplus_setxattr+0x3b8/0x1df0 fs/hfsplus/xattr.c:342 hfsplus_setxattr+0xb4/0xec 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:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x250/0x2b4 fs/xattr.c:611 path_setxattr+0x17c/0x258 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __arm64_sys_lsetxattr+0xbc/0xd8 fs/xattr.c:649 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Allocated by task 4321: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xbc/0xfc mm/kasan/common.c:513 __kasan_kmalloc+0x10/0x1c mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc+0x29c/0x4c8 mm/slub.c:4407 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] __hfs_bnode_create+0xe4/0x864 fs/hfsplus/bnode.c:416 hfsplus_bnode_find+0x200/0xcb0 fs/hfsplus/bnode.c:497 hfsplus_brec_find+0x134/0x4a0 fs/hfsplus/bfind.c:172 hfsplus_find_attr+0x1e0/0x33c hfsplus_attr_exists+0x154/0x1c8 fs/hfsplus/attributes.c:182 __hfsplus_setxattr+0x384/0x1df0 fs/hfsplus/xattr.c:336 hfsplus_setxattr+0xb4/0xec 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:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x250/0x2b4 fs/xattr.c:611 path_setxattr+0x17c/0x258 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __arm64_sys_lsetxattr+0xbc/0xd8 fs/xattr.c:649 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348 insert_work+0x64/0x394 kernel/workqueue.c:1366 __queue_work+0xb84/0x114c kernel/workqueue.c:1532 queue_work_on+0xc4/0x17c kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] addr_event+0x300/0x3f8 drivers/infiniband/core/roce_gid_mgmt.c:853 inet6addr_event+0xf8/0x160 drivers/infiniband/core/roce_gid_mgmt.c:883 notifier_call_chain kernel/notifier.c:83 [inline] atomic_notifier_call_chain+0x174/0x2a0 kernel/notifier.c:198 inet6addr_notifier_call_chain+0x30/0x40 net/ipv6/addrconf_core.c:109 ipv6_add_addr+0x918/0xb6c net/ipv6/addrconf.c:1182 addrconf_add_linklocal+0x24c/0x83c net/ipv6/addrconf.c:3242 addrconf_addr_gen+0x3a0/0x944 net/ipv6/addrconf.c:3373 addrconf_init_auto_addrs+0x788/0xcac addrconf_notify+0x6ac/0xc58 net/ipv6/addrconf.c:3665 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2018 [inline] netdev_state_change+0x180/0x22c net/core/dev.c:1409 linkwatch_do_dev+0x2b0/0x3c8 net/core/link_watch.c:167 __linkwatch_run_queue+0x424/0x730 net/core/link_watch.c:213 linkwatch_event+0x58/0x68 net/core/link_watch.c:252 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 The buggy address belongs to the object at ffff0000db0db200 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of 256-byte region [ffff0000db0db200, ffff0000db0db300) The buggy address belongs to the page: page:00000000812deec4 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11b0da head:00000000812deec4 order:1 compound_mapcount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc00035aa080 0000000500000005 ffff0000c0002480 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000db0db200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000db0db280: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000db0db300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000db0db380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000db0db400: 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 ffff7c3000008907 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=00000001ae2e0000 [ffff7c3000008907] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 4321 Comm: syz.4.47 Tainted: G B 5.15.173-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+0x74/0x2b4 mm/kasan/generic.c:189 lr : memcpy+0x90/0xe8 mm/kasan/shadow.c:65 sp : ffff8000205b6d90 x29: ffff8000205b6d90 x28: 00000000000000ff x27: dfff800000000000 x26: ffff8000205b6ec0 x25: 1ffff00002890f77 x24: 0000000000000001 x23: ffff800017104000 x22: ffff800008fc3050 x21: ffff8000205b6ea0 x20: ffffe1800004483f x19: 0000000000000001 x18: 1fffe00036835d8e x17: 1fffe00036835d8e x16: ffff800011ab80a8 x15: ffff800014b5fa40 x14: ffff0001b41aec80 x13: ffff0001b41aec7c x12: 0000000000000001 x11: 1ffffc3000008907 x10: 1ffffc3000008907 x9 : ffffffffffffffff x8 : ffff7c3000008907 x7 : 0000000000000000 x6 : ffff80000826abc8 x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff800008fc3050 x2 : 0000000000000000 x1 : 0000000000000001 x0 : ffffe1800004483f 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+0x74/0x2b4 mm/kasan/generic.c:189 memcpy+0x90/0xe8 mm/kasan/shadow.c:65 hfsplus_bnode_read+0x120/0x24c fs/hfsplus/bnode.c:32 hfsplus_bnode_dump+0x2c4/0x4cc hfsplus_brec_remove+0x3d0/0x4a4 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x1e0/0x3ec fs/hfsplus/attributes.c:299 hfsplus_delete_attr+0x2e4/0x41c fs/hfsplus/attributes.c:345 __hfsplus_setxattr+0x3b8/0x1df0 fs/hfsplus/xattr.c:342 hfsplus_setxattr+0xb4/0xec 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:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x250/0x2b4 fs/xattr.c:611 path_setxattr+0x17c/0x258 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __arm64_sys_lsetxattr+0xbc/0xd8 fs/xattr.c:649 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Code: 5400014c b4000b8c aa2a03e9 8b0b0129 (3940010a) ---[ end trace ce2c18293f07d141 ]--- ---------------- 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