loop0: detected capacity change from 0 to 1024 hfsplus: request for non-existent node 768 in B*Tree hfsplus: request for non-existent node 768 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 ffff88814a83efc0 by task syz-executor554/3499 CPU: 1 PID: 3499 Comm: syz-executor554 Not tainted 5.15.152-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb 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_all_attrs+0x267/0x3c0 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0xb83/0xfb0 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x35f/0x7f0 fs/hfsplus/dir.c:385 hfsplus_rename+0xc4/0x1b0 fs/hfsplus/dir.c:547 vfs_rename+0xd32/0x10f0 fs/namei.c:4832 do_renameat2+0xe0f/0x1700 fs/namei.c:4985 __do_sys_rename fs/namei.c:5031 [inline] __se_sys_rename fs/namei.c:5029 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:5029 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f085f6125f9 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:00007ffe6635a4d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f085f6125f9 RDX: 00007f085f6118f0 RSI: 00000000200000c0 RDI: 0000000020000080 RBP: 00007f085f685610 R08: 0000000000000692 R09: 0000000000000000 R10: 00007ffe6635a3a0 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffe6635a6a8 R14: 0000000000000001 R15: 0000000000000001 Allocated by task 3499: 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:596 [inline] kzalloc include/linux/slab.h:721 [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:183 hfsplus_find_attr fs/hfsplus/attributes.c:160 [inline] hfsplus_delete_all_attrs+0x23e/0x3c0 fs/hfsplus/attributes.c:371 hfsplus_delete_cat+0xb83/0xfb0 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x35f/0x7f0 fs/hfsplus/dir.c:385 hfsplus_rename+0xc4/0x1b0 fs/hfsplus/dir.c:547 vfs_rename+0xd32/0x10f0 fs/namei.c:4832 do_renameat2+0xe0f/0x1700 fs/namei.c:4985 __do_sys_rename fs/namei.c:5031 [inline] __se_sys_rename fs/namei.c:5029 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:5029 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb 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] call_usermodehelper_exec+0x269/0x450 kernel/umh.c:435 kobject_uevent_env+0x69e/0x8d0 lib/kobject_uevent.c:618 driver_register+0x35b/0x3a0 drivers/base/driver.c:248 __hid_register_driver+0x126/0x170 drivers/hid/hid-core.c:2577 ryos_init+0x76/0xa4 drivers/hid/hid-roccat-ryos.c:224 do_one_initcall+0x22b/0x7a0 init/main.c:1299 do_initcall_level+0x157/0x207 init/main.c:1372 do_initcalls+0x49/0x86 init/main.c:1388 kernel_init_freeable+0x425/0x5b5 init/main.c:1612 kernel_init+0x19/0x290 init/main.c:1503 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff88814a83ef00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes to the right of 192-byte region [ffff88814a83ef00, ffff88814a83efc0) The buggy address belongs to the page: page:ffffea00052a0f80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14a83e flags: 0x57ff00000000200(slab|node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000000200 ffffea000529f180 0000000600000006 ffff888011c41a00 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 12847449764, free_ts 0 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5421 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2031 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:591 [inline] kzalloc include/linux/slab.h:721 [inline] call_usermodehelper_setup+0x8a/0x260 kernel/umh.c:365 kobject_uevent_env+0x681/0x8d0 lib/kobject_uevent.c:614 driver_register+0x35b/0x3a0 drivers/base/driver.c:248 __hid_register_driver+0x126/0x170 drivers/hid/hid-core.c:2577 arvo_init+0x76/0xa4 drivers/hid/hid-roccat-arvo.c:441 do_one_initcall+0x22b/0x7a0 init/main.c:1299 do_initcall_level+0x157/0x207 init/main.c:1372 do_initcalls+0x49/0x86 init/main.c:1388 kernel_init_freeable+0x425/0x5b5 init/main.c:1612 kernel_init+0x19/0x290 init/main.c:1503 page_owner free stack trace missing Memory state around the buggy address: ffff88814a83ee80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88814a83ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88814a83ef80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88814a83f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88814a83f080: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================