hfsplus: request for non-existent node 256 in B*Tree hfsplus: request for non-existent node 256 in B*Tree ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x234/0x250 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff88802093b9c0 by task syz-executor271/5062 CPU: 0 PID: 5062 Comm: syz-executor271 Not tainted 6.7.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 hfsplus_bnode_read+0x234/0x250 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:45 [inline] hfsplus_bnode_dump+0x2a2/0x3d0 fs/hfsplus/bnode.c:321 hfsplus_brec_remove+0x3de/0x4f0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x29e/0x3b0 fs/hfsplus/attributes.c:299 hfsplus_delete_all_attrs+0x26d/0x330 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x83b/0xdd0 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x213/0x7f0 fs/hfsplus/dir.c:385 vfs_unlink+0x2f1/0x900 fs/namei.c:4318 do_unlinkat+0x5bc/0x740 fs/namei.c:4382 __do_sys_unlink fs/namei.c:4430 [inline] __se_sys_unlink fs/namei.c:4428 [inline] __x64_sys_unlink+0xc8/0x110 fs/namei.c:4428 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fc8a6a0e5f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffcc058b358 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007ffcc058b538 RCX: 00007fc8a6a0e5f9 RDX: 00007fc8a6a0d8f0 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007fc8a6a81610 R08: 000000000000066d R09: 0000000000000000 R10: 00007ffcc058b220 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffcc058b528 R14: 0000000000000001 R15: 0000000000000001 Allocated by task 5062: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0x59/0x90 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] __hfs_bnode_create+0x108/0x860 fs/hfsplus/bnode.c:409 hfsplus_bnode_find+0x2c4/0xcb0 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x2b9/0x520 fs/hfsplus/bfind.c:183 hfsplus_find_attr fs/hfsplus/attributes.c:160 [inline] hfsplus_delete_all_attrs+0x246/0x330 fs/hfsplus/attributes.c:371 hfsplus_delete_cat+0x83b/0xdd0 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x213/0x7f0 fs/hfsplus/dir.c:385 vfs_unlink+0x2f1/0x900 fs/namei.c:4318 do_unlinkat+0x5bc/0x740 fs/namei.c:4382 __do_sys_unlink fs/namei.c:4430 [inline] __se_sys_unlink fs/namei.c:4428 [inline] __x64_sys_unlink+0xc8/0x110 fs/namei.c:4428 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0x78/0x80 mm/kasan/generic.c:492 insert_work+0x38/0x230 kernel/workqueue.c:1647 __queue_work+0x62e/0x11d0 kernel/workqueue.c:1796 queue_work_on+0xed/0x110 kernel/workqueue.c:1831 queue_work include/linux/workqueue.h:562 [inline] call_usermodehelper_exec+0x1d2/0x4c0 kernel/umh.c:434 kobject_uevent_env+0x1693/0x1800 lib/kobject_uevent.c:618 kset_register+0x1b6/0x2a0 lib/kobject.c:873 class_register+0x21e/0x330 drivers/base/class.c:203 mon_bin_init+0x17/0xe0 drivers/usb/mon/mon_bin.c:1385 mon_init+0xbb/0x210 drivers/usb/mon/mon_main.c:344 do_one_initcall+0x11c/0x650 init/main.c:1236 do_initcall_level init/main.c:1298 [inline] do_initcalls init/main.c:1314 [inline] do_basic_setup init/main.c:1333 [inline] kernel_init_freeable+0x687/0xc10 init/main.c:1551 kernel_init+0x1c/0x2a0 init/main.c:1441 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 The buggy address belongs to the object at ffff88802093b900 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 40 bytes to the right of allocated 152-byte region [ffff88802093b900, ffff88802093b998) The buggy address belongs to the physical page: page:ffffea0000824ec0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802093bb00 pfn:0x2093b flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xe() raw: 00fff00000000800 ffff888013040000 ffffea0000828410 ffff888013041140 raw: ffff88802093bb00 ffff88802093b000 000000010000000e 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 0x2420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 1, tgid 1 (swapper/0), ts 10221424282, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 __alloc_pages_node include/linux/gfp.h:238 [inline] kmem_getpages mm/slab.c:1356 [inline] cache_grow_begin+0x99/0x3a0 mm/slab.c:2550 cache_alloc_refill+0x295/0x3b0 mm/slab.c:2923 ____cache_alloc mm/slab.c:2999 [inline] ____cache_alloc mm/slab.c:2982 [inline] __do_cache_alloc mm/slab.c:3185 [inline] slab_alloc_node mm/slab.c:3230 [inline] __kmem_cache_alloc_node+0x37f/0x460 mm/slab.c:3521 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc_node+0x4c/0x90 mm/slab_common.c:1014 kmalloc_node include/linux/slab.h:620 [inline] __alloc_alien_cache mm/slab.c:634 [inline] alloc_alien_cache mm/slab.c:657 [inline] setup_kmem_cache_node+0x1f6/0x3d0 mm/slab.c:878 setup_kmem_cache_nodes mm/slab.c:3635 [inline] do_tune_cpucache+0x188/0x2d0 mm/slab.c:3705 enable_cpucache+0x60/0xc0 mm/slab.c:3762 __kmem_cache_create+0x1a9/0x230 mm/slab.c:2059 create_cache mm/slab_common.c:235 [inline] kmem_cache_create_usercopy+0x1e3/0x370 mm/slab_common.c:340 kmem_cache_create+0x11/0x20 mm/slab_common.c:395 isp1760_init_kmem_once+0x55/0xd0 drivers/usb/isp1760/isp1760-hcd.c:2530 isp1760_init+0xf/0x90 drivers/usb/isp1760/isp1760-if.c:277 do_one_initcall+0x11c/0x650 init/main.c:1236 page_owner free stack trace missing Memory state around the buggy address: ffff88802093b880: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802093b900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802093b980: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802093ba00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802093ba80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================