================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0xc7/0x1c0 fs/hfsplus/bnode.c:32 Write of size 3968 at addr ffff88807cda3800 by task syz.1.480/6030 CPU: 0 PID: 6030 Comm: syz.1.480 Not tainted 5.15.180-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 hfsplus_bnode_read+0xc7/0x1c0 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_key+0x18c/0x2a0 fs/hfsplus/bnode.c:72 hfsplus_brec_insert+0x6e6/0xdd0 fs/hfsplus/brec.c:141 hfsplus_create_attr+0x49a/0x630 fs/hfsplus/attributes.c:252 __hfsplus_setxattr+0x6ed/0x22c0 fs/hfsplus/xattr.c:354 hfsplus_setxattr+0xac/0xe0 fs/hfsplus/xattr.c:434 hfsplus_trusted_setxattr+0x3c/0x50 fs/hfsplus/xattr_trusted.c:30 __vfs_setxattr+0x3e7/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216 vfs_setxattr+0x21d/0x420 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x27e/0x2e0 fs/xattr.c:611 path_setxattr+0x1bc/0x2a0 fs/xattr.c:630 __do_sys_setxattr fs/xattr.c:646 [inline] __se_sys_setxattr fs/xattr.c:642 [inline] __x64_sys_setxattr+0xb7/0xd0 fs/xattr.c:642 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f3918b24169 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f391698c038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007f3918d4bfa0 RCX: 00007f3918b24169 RDX: 0000200000004000 RSI: 0000200000003fc0 RDI: 0000200000003f80 RBP: 00007f3918ba6a68 R08: 0000000000000001 R09: 0000000000000000 R10: 000000000000002a R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3918d4bfa0 R15: 00007ffddbb09d78 Allocated by task 6030: 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+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc+0x168/0x300 mm/slub.c:4407 kmalloc include/linux/slab.h:609 [inline] hfsplus_find_init+0x81/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_create_attr+0x15d/0x630 fs/hfsplus/attributes.c:216 __hfsplus_setxattr+0x6ed/0x22c0 fs/hfsplus/xattr.c:354 hfsplus_setxattr+0xac/0xe0 fs/hfsplus/xattr.c:434 hfsplus_trusted_setxattr+0x3c/0x50 fs/hfsplus/xattr_trusted.c:30 __vfs_setxattr+0x3e7/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216 vfs_setxattr+0x21d/0x420 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x27e/0x2e0 fs/xattr.c:611 path_setxattr+0x1bc/0x2a0 fs/xattr.c:630 __do_sys_setxattr fs/xattr.c:646 [inline] __se_sys_setxattr fs/xattr.c:642 [inline] __x64_sys_setxattr+0xb7/0xd0 fs/xattr.c:642 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88807cda3800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff88807cda3800, ffff88807cda3c00) The buggy address belongs to the page: page:ffffea0001f36800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7cda0 head:ffffea0001f36800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001de7000 0000000300000003 ffff888017441dc0 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4215, ts 62397772646, free_ts 62353462243 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192 __alloc_pages+0x272/0x700 mm/page_alloc.c:5466 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] __kmalloc_node_track_caller+0x1f6/0x390 mm/slub.c:4958 kmalloc_reserve net/core/skbuff.c:356 [inline] __alloc_skb+0x12c/0x590 net/core/skbuff.c:427 alloc_skb include/linux/skbuff.h:1162 [inline] nlmsg_new include/net/netlink.h:953 [inline] inet6_rt_notify+0xdc/0x280 net/ipv6/route.c:6181 fib6_add_rt2node net/ipv6/ip6_fib.c:1255 [inline] fib6_add+0x1db2/0x3c80 net/ipv6/ip6_fib.c:1484 __ip6_ins_rt net/ipv6/route.c:1302 [inline] ip6_ins_rt+0x102/0x170 net/ipv6/route.c:1312 __ipv6_ifa_notify+0x5c3/0x11d0 net/ipv6/addrconf.c:6188 ipv6_ifa_notify net/ipv6/addrconf.c:6227 [inline] addrconf_dad_completed+0x188/0xcc0 net/ipv6/addrconf.c:4239 addrconf_dad_work+0xdda/0x16f0 net/ipv6/addrconf.c:-1 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 free_slab mm/slub.c:2015 [inline] discard_slab mm/slub.c:2021 [inline] __unfreeze_partials+0x1b7/0x210 mm/slub.c:2507 put_cpu_partial+0x132/0x1a0 mm/slub.c:2587 do_slab_free mm/slub.c:3487 [inline] ___cache_free+0xe3/0x100 mm/slub.c:3506 qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x53/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0xf3/0x280 mm/slub.c:3233 anon_vma_chain_alloc mm/rmap.c:138 [inline] __anon_vma_prepare+0x66/0x410 mm/rmap.c:192 anon_vma_prepare include/linux/rmap.h:152 [inline] do_anonymous_page mm/memory.c:3836 [inline] handle_pte_fault mm/memory.c:4648 [inline] __handle_mm_fault mm/memory.c:4785 [inline] handle_mm_fault+0x4f66/0x5960 mm/memory.c:4883 do_user_addr_fault arch/x86/mm/fault.c:1357 [inline] handle_page_fault arch/x86/mm/fault.c:1445 [inline] exc_page_fault+0x271/0x700 arch/x86/mm/fault.c:1501 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 Memory state around the buggy address: ffff88807cda3900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807cda3980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807cda3a00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807cda3a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807cda3b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================