loop0: 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+0x8f/0x1e0 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff888074840198 by task syz.0.16/5041 CPU: 0 PID: 5041 Comm: syz.0.16 Not tainted 5.15.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 hfsplus_bnode_read+0x8f/0x1e0 fs/hfsplus/bnode.c:32 hfsplus_bnode_dump+0x4b3/0x620 fs/hfsplus/bnode.c:-1 hfsplus_brec_remove+0x476/0x540 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x1d1/0x360 fs/hfsplus/attributes.c:299 hfsplus_delete_attr+0x357/0x480 fs/hfsplus/attributes.c:345 __hfsplus_setxattr+0x4b6/0x1e20 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+0x3e0/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216 vfs_setxattr+0x168/0x2f0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x2da/0x300 fs/xattr.c:611 path_setxattr+0x142/0x280 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+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fd7afbc5169 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:00007fd7aee35038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007fd7afdecfa0 RCX: 00007fd7afbc5169 RDX: 0000000000000000 RSI: 0000200000000240 RDI: 0000200000000180 RBP: 00007fd7afc47a68 R08: 0000000000000002 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd7afdecfa0 R15: 00007ffdb0be2b28 Allocated by task 5041: 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 mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:609 [inline] kzalloc include/linux/slab.h:735 [inline] __hfs_bnode_create+0xf1/0xc10 fs/hfsplus/bnode.c:422 hfsplus_bnode_find+0x220/0xd00 fs/hfsplus/bnode.c:503 hfsplus_brec_find+0x159/0x500 fs/hfsplus/bfind.c:172 hfsplus_attr_exists+0x160/0x1d0 fs/hfsplus/attributes.c:182 __hfsplus_setxattr+0x475/0x1e20 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+0x3e0/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216 vfs_setxattr+0x168/0x2f0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x2da/0x300 fs/xattr.c:611 path_setxattr+0x142/0x280 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+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888074840100 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 152 bytes inside of 192-byte region [ffff888074840100, ffff8880748401c0) The buggy address belongs to the page: page:ffffea0001d21000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x74840 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888016841a00 raw: 0000000000000000 0000000080100010 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 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 5041, ts 117625162912, free_ts 117412830526 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 __alloc_pages_node include/linux/gfp.h:570 [inline] alloc_slab_page mm/slub.c:1777 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xb6/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] __kmalloc_node+0x200/0x3b0 mm/slub.c:4451 kmalloc_array_node include/linux/slab.h:697 [inline] kcalloc_node include/linux/slab.h:702 [inline] memcg_alloc_page_obj_cgroups+0x81/0x120 mm/memcontrol.c:2841 memcg_slab_post_alloc_hook mm/slab.h:313 [inline] slab_post_alloc_hook+0xba/0x380 mm/slab.h:526 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x100/0x290 mm/slub.c:3233 kmem_cache_zalloc include/linux/slab.h:725 [inline] alloc_buffer_head+0x21/0x100 fs/buffer.c:3311 alloc_page_buffers+0x341/0x600 fs/buffer.c:832 create_empty_buffers+0x3a/0x6d0 fs/buffer.c:1562 create_page_buffers+0x1c4/0x320 fs/buffer.c:1679 block_read_full_page+0xe5/0xd10 fs/buffer.c:2270 do_read_cache_page+0x8a1/0x1030 mm/filemap.c:-1 read_mapping_page include/linux/pagemap.h:515 [inline] __hfs_bnode_create+0x535/0xc10 fs/hfsplus/bnode.c:453 hfsplus_bnode_find+0x220/0xd00 fs/hfsplus/bnode.c:503 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+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 free_slab mm/slub.c:2015 [inline] discard_slab mm/slub.c:2021 [inline] __unfreeze_partials+0x1a5/0x200 mm/slub.c:2507 put_cpu_partial+0x12d/0x190 mm/slub.c:2587 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc_track_caller+0x125/0x330 mm/slub.c:4925 kvasprintf+0xd4/0x180 lib/kasprintf.c:25 kobject_set_name_vargs+0x5d/0x110 lib/kobject.c:297 kobject_add_varg lib/kobject.c:392 [inline] kobject_init_and_add+0xda/0x190 lib/kobject.c:481 netdev_queue_add_kobject net/core/net-sysfs.c:1666 [inline] netdev_queue_update_kobjects+0x19c/0x3e0 net/core/net-sysfs.c:1711 register_queue_kobjects net/core/net-sysfs.c:1772 [inline] netdev_register_kobject+0x265/0x310 net/core/net-sysfs.c:2018 register_netdevice+0x1019/0x16b0 net/core/dev.c:10397 cfg80211_register_netdevice+0x155/0x2f0 net/wireless/core.c:1356 Memory state around the buggy address: ffff888074840080: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888074840100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888074840180: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888074840200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888074840280: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================