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+0x18c/0x1a0 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff8880ac250fb8 by task syz-executor155/7946 CPU: 1 PID: 7946 Comm: syz-executor155 Not tainted 4.14.300-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 hfsplus_bnode_read+0x18c/0x1a0 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:47 [inline] hfsplus_bnode_dump+0x255/0x310 fs/hfsplus/bnode.c:330 hfsplus_brec_remove+0x384/0x480 fs/hfsplus/brec.c:228 __hfsplus_delete_attr+0x1eb/0x310 fs/hfsplus/attributes.c:299 hfsplus_delete_all_attrs+0x12c/0x3a0 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x765/0xd70 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x1d6/0x6b0 fs/hfsplus/dir.c:387 vfs_unlink+0x230/0x470 fs/namei.c:4029 do_unlinkat+0x30c/0x5c0 fs/namei.c:4094 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Allocated by task 7946: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] __hfs_bnode_create+0xe7/0x950 fs/hfsplus/bnode.c:420 hfsplus_bnode_find+0x2cb/0x9e0 fs/hfsplus/bnode.c:501 hfsplus_brec_find+0x265/0x460 fs/hfsplus/bfind.c:183 hfsplus_find_attr fs/hfsplus/attributes.c:160 [inline] hfsplus_delete_all_attrs+0x2b6/0x3a0 fs/hfsplus/attributes.c:371 hfsplus_delete_cat+0x765/0xd70 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x1d6/0x6b0 fs/hfsplus/dir.c:387 vfs_unlink+0x230/0x470 fs/namei.c:4029 do_unlinkat+0x30c/0x5c0 fs/namei.c:4094 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Freed by task 1: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 kernfs_release_file+0xcc/0x160 fs/kernfs/file.c:764 kernfs_fop_release+0x136/0x180 fs/kernfs/file.c:776 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 The buggy address belongs to the object at ffff8880ac250f00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 184 bytes inside of 192-byte region [ffff8880ac250f00, ffff8880ac250fc0) The buggy address belongs to the page: page:ffffea0002b09400 count:1 mapcount:0 mapping:ffff8880ac250000 index:0xffff8880ac250900 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880ac250000 ffff8880ac250900 0000000100000009 raw: ffff88813fe64138 ffffea0002b1ca20 ffff88813fe74040 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880ac250e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880ac250f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880ac250f80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880ac251000: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fb fb ffff8880ac251080: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb ==================================================================