loop9: detected capacity change from 0 to 1024 hfsplus: request for non-existent node 134217728 in B*Tree hfsplus: request for non-existent node 134217728 in B*Tree ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x85/0x1c0 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff88805f4d6c98 by task syz.9.869/9014 CPU: 1 PID: 9014 Comm: syz.9.869 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 hfsplus_bnode_read+0x85/0x1c0 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:47 [inline] hfsplus_bnode_dump+0x3f7/0x7c0 fs/hfsplus/bnode.c:328 hfsplus_brec_remove+0x428/0x4e0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x271/0x450 fs/hfsplus/attributes.c:299 hfsplus_delete_attr+0x34f/0x4a0 fs/hfsplus/attributes.c:345 __hfsplus_setxattr+0x494/0x22c0 fs/hfsplus/xattr.c:342 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:0x7f5a45fa0169 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:00007f5a43e08038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007f5a461c7fa0 RCX: 00007f5a45fa0169 RDX: 0000200000001680 RSI: 0000200000000240 RDI: 0000200000000180 RBP: 00007f5a46022a68 R08: 0000000000000002 R09: 0000000000000000 R10: 0000000000001015 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f5a461c7fa0 R15: 00007ffe67d7c038 Allocated by task 9014: 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] kzalloc include/linux/slab.h:735 [inline] __hfs_bnode_create+0xf9/0xbb0 fs/hfsplus/bnode.c:416 hfsplus_bnode_find+0x22e/0xe80 fs/hfsplus/bnode.c:497 hfsplus_brec_find+0x17f/0x570 fs/hfsplus/bfind.c:172 hfsplus_attr_exists+0x15b/0x1c0 fs/hfsplus/attributes.c:182 __hfsplus_setxattr+0x453/0x22c0 fs/hfsplus/xattr.c:336 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 Last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 insert_work+0x54/0x3e0 kernel/workqueue.c:1366 __queue_work+0x963/0xd00 kernel/workqueue.c:1532 queue_work_on+0x14b/0x250 kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x82f/0x960 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers+0xb2/0xf0 net/core/dev.c:2075 ipvlan_device_event+0x3fe/0xa70 drivers/net/ipvlan/ipvlan_main.c:793 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_set_mac_address+0x345/0x460 net/core/dev.c:9113 dev_set_mac_address_user+0x2d/0x50 net/core/dev.c:9127 do_setlink+0x7f5/0x3d80 net/core/rtnetlink.c:2734 __rtnl_newlink net/core/rtnetlink.c:3450 [inline] rtnl_newlink+0x17bf/0x2050 net/core/rtnetlink.c:3572 rtnetlink_rcv_msg+0x99d/0xef0 net/core/rtnetlink.c:5650 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2489 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x7c0/0x990 net/netlink/af_netlink.c:1337 netlink_sendmsg+0xa30/0xd60 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x564/0x720 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2071 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 ffff88805f4d6c00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 152 bytes inside of 192-byte region [ffff88805f4d6c00, ffff88805f4d6cc0) The buggy address belongs to the page: page:ffffea00017d3580 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5f4d6 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888017441a00 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 154, ts 65669084456, free_ts 18421624603 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] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc_trace+0x1a0/0x290 mm/slub.c:3245 kmalloc include/linux/slab.h:604 [inline] addr_event+0xc6/0x420 drivers/infiniband/core/roce_gid_mgmt.c:840 inet6addr_event+0xf8/0x160 drivers/infiniband/core/roce_gid_mgmt.c:883 notifier_call_chain kernel/notifier.c:83 [inline] atomic_notifier_call_chain+0x15f/0x290 kernel/notifier.c:198 ipv6_add_addr+0xb5d/0xdd0 net/ipv6/addrconf.c:1182 addrconf_add_linklocal+0x343/0x9e0 net/ipv6/addrconf.c:3242 addrconf_addr_gen+0x85b/0xc00 net/ipv6/addrconf.c:-1 addrconf_dev_config net/ipv6/addrconf.c:3418 [inline] addrconf_init_auto_addrs+0x944/0xea0 net/ipv6/addrconf.c:3496 addrconf_notify+0xabc/0xf40 net/ipv6/addrconf.c:3665 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 netdev_state_change+0x11b/0x190 net/core/dev.c:1440 linkwatch_do_dev+0x10c/0x160 net/core/link_watch.c:167 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_contig_range+0x95/0xf0 mm/page_alloc.c:9385 destroy_args+0xfe/0x980 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x40d/0x470 mm/debug_vm_pgtable.c:1331 do_one_initcall+0x22b/0x7a0 init/main.c:1302 do_initcall_level+0x157/0x210 init/main.c:1375 do_initcalls+0x49/0x90 init/main.c:1391 kernel_init_freeable+0x425/0x5c0 init/main.c:1615 kernel_init+0x19/0x290 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff88805f4d6b80: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ffff88805f4d6c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805f4d6c80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805f4d6d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805f4d6d80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================