hfsplus: request for non-existent node 184549376 in B*Tree hfsplus: request for non-existent node 184549376 in B*Tree ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x19b/0x1b0 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff8880abfd46b8 by task syz-executor141/8110 CPU: 0 PID: 8110 Comm: syz-executor141 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 hfsplus_bnode_read+0x19b/0x1b0 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:47 [inline] hfsplus_bnode_dump+0x2c2/0x3a0 fs/hfsplus/bnode.c:328 hfsplus_brec_remove+0x3d7/0x4e0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x217/0x370 fs/hfsplus/attributes.c:299 hfsplus_delete_all_attrs+0x149/0x3f0 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x824/0xe30 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x1d2/0x820 fs/hfsplus/dir.c:385 vfs_unlink+0x27d/0x4e0 fs/namei.c:4002 do_unlinkat+0x3b8/0x660 fs/namei.c:4065 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f827d65d779 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff50902a48 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f827d65d779 RDX: 00007f827d61bdf3 RSI: 0000000000000000 RDI: 0000000020000140 RBP: 00007f827d61d010 R08: 00000000000005f0 R09: 0000000000000000 R10: 00007fff50902910 R11: 0000000000000246 R12: 00007f827d61d0a0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8110: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] kzalloc include/linux/slab.h:709 [inline] __hfs_bnode_create+0x105/0xb60 fs/hfsplus/bnode.c:416 hfsplus_bnode_find+0x2aa/0xb80 fs/hfsplus/bnode.c:497 hfsplus_brec_find+0x2af/0x500 fs/hfsplus/bfind.c:183 hfsplus_find_attr fs/hfsplus/attributes.c:160 [inline] hfsplus_delete_all_attrs+0x2dd/0x3f0 fs/hfsplus/attributes.c:371 hfsplus_delete_cat+0x824/0xe30 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x1d2/0x820 fs/hfsplus/dir.c:385 vfs_unlink+0x27d/0x4e0 fs/namei.c:4002 do_unlinkat+0x3b8/0x660 fs/namei.c:4065 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6247: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 kvfree+0x59/0x60 mm/util.c:452 getxattr+0x1c7/0x2b0 fs/xattr.c:620 path_getxattr+0xb6/0x150 fs/xattr.c:635 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880abfd4600 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 184 bytes inside of 192-byte region [ffff8880abfd4600, ffff8880abfd46c0) The buggy address belongs to the page: page:ffffea0002aff500 count:1 mapcount:0 mapping:ffff88813bff0040 index:0xffff8880abfd4e00 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002d6ea88 ffffea0002d4b188 ffff88813bff0040 raw: ffff8880abfd4e00 ffff8880abfd4000 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880abfd4580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880abfd4600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880abfd4680: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880abfd4700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880abfd4780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================