memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5033 'syz-executor115' loop0: detected capacity change from 0 to 1024 hfsplus: request for non-existent node 32768 in B*Tree hfsplus: request for non-existent node 32768 in B*Tree ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x232/0x250 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff888028dc9cc0 by task syz-executor115/5033 CPU: 0 PID: 5033 Comm: syz-executor115 Not tainted 6.5.0-rc4-next-20230804-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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+0x232/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+0x819/0xd90 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x213/0x7f0 fs/hfsplus/dir.c:385 vfs_unlink+0x2f1/0x900 fs/namei.c:4329 do_unlinkat+0x3da/0x6d0 fs/namei.c:4395 __do_sys_unlink fs/namei.c:4443 [inline] __se_sys_unlink fs/namei.c:4441 [inline] __x64_sys_unlink+0xc8/0x110 fs/namei.c:4441 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0fefd705f9 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:00007fff6a2086a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007fff6a208888 RCX: 00007f0fefd705f9 RDX: 00007f0fefd6f8f0 RSI: 0000000000000000 RDI: 0000000020000140 RBP: 00007f0fefde3610 R08: 0000000000000640 R09: 0000000000000000 R10: 00007fff6a208570 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff6a208878 R14: 0000000000000001 R15: 0000000000000001 Allocated by task 5033: 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+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1023 [inline] __kmalloc+0x60/0x100 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] kzalloc include/linux/slab.h:720 [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+0x819/0xd90 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x213/0x7f0 fs/hfsplus/dir.c:385 vfs_unlink+0x2f1/0x900 fs/namei.c:4329 do_unlinkat+0x3da/0x6d0 fs/namei.c:4395 __do_sys_unlink fs/namei.c:4443 [inline] __se_sys_unlink fs/namei.c:4441 [inline] __x64_sys_unlink+0xc8/0x110 fs/namei.c:4441 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 insert_work+0x4a/0x330 kernel/workqueue.c:1559 __queue_work+0x5f5/0x1040 kernel/workqueue.c:1720 queue_work_on+0xed/0x110 kernel/workqueue.c:1750 queue_work include/linux/workqueue.h:506 [inline] call_usermodehelper_exec+0x1d2/0x4c0 kernel/umh.c:434 kobject_uevent_env+0xf6d/0x1800 lib/kobject_uevent.c:618 kernel_add_sysfs_param kernel/params.c:817 [inline] param_sysfs_builtin kernel/params.c:852 [inline] param_sysfs_builtin_init+0x327/0x450 kernel/params.c:986 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5bd/0x8f0 init/main.c:1546 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 The buggy address belongs to the object at ffff888028dc9c00 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 [ffff888028dc9c00, ffff888028dc9c98) The buggy address belongs to the physical page: page:ffffea0000a37240 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x28dc9 anon flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888012841a00 0000000000000000 0000000000000001 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, tgid 1 (swapper/0), ts 24398955976, free_ts 24384829049 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1567 prep_new_page mm/page_alloc.c:1574 [inline] get_page_from_freelist+0x10d7/0x31b0 mm/page_alloc.c:3253 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4509 alloc_page_interleave+0x1e/0x250 mm/mempolicy.c:2125 alloc_pages+0x22a/0x270 mm/mempolicy.c:2287 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x24e/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8bc/0x1570 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x137/0x350 mm/slub.c:3517 kmalloc_trace+0x25/0xe0 mm/slab_common.c:1114 kmalloc include/linux/slab.h:599 [inline] kzalloc include/linux/slab.h:720 [inline] call_usermodehelper_setup+0x9a/0x340 kernel/umh.c:363 kobject_uevent_env+0xf4e/0x1800 lib/kobject_uevent.c:614 kernel_add_sysfs_param kernel/params.c:817 [inline] param_sysfs_builtin kernel/params.c:852 [inline] param_sysfs_builtin_init+0x327/0x450 kernel/params.c:986 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5bd/0x8f0 init/main.c:1546 kernel_init+0x1c/0x2a0 init/main.c:1437 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1158 [inline] free_unref_page_prepare+0x508/0xb90 mm/page_alloc.c:2380 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2475 kasan_depopulate_vmalloc_pte+0x63/0x80 mm/kasan/shadow.c:427 apply_to_pte_range mm/memory.c:2603 [inline] apply_to_pmd_range mm/memory.c:2647 [inline] apply_to_pud_range mm/memory.c:2683 [inline] apply_to_p4d_range mm/memory.c:2719 [inline] __apply_to_page_range+0x5ed/0xdb0 mm/memory.c:2753 kasan_release_vmalloc+0xa8/0xc0 mm/kasan/shadow.c:544 __purge_vmap_area_lazy+0x8b9/0x2160 mm/vmalloc.c:1770 drain_vmap_area_work+0x54/0xd0 mm/vmalloc.c:1804 process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2603 worker_thread+0x687/0x1110 kernel/workqueue.c:2754 kthread+0x33a/0x430 kernel/kthread.c:389 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff888028dc9b80: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888028dc9c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888028dc9c80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888028dc9d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888028dc9d80: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================