memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5014 'syz-executor114' loop0: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x57a/0x11f0 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff888015e8d40c by task syz-executor114/5014 CPU: 1 PID: 5014 Comm: syz-executor114 Not tainted 6.5.0-rc1-syzkaller-00006-g3f01e9fed845 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 hfsplus_uni2asc+0x57a/0x11f0 fs/hfsplus/unicode.c:179 hfsplus_readdir+0x92c/0x1310 fs/hfsplus/dir.c:207 iterate_dir+0x231/0x5a0 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1b32f107d9 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:00007fffa4687868 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1b32f107d9 RDX: 0000000000000067 RSI: 0000000020000540 RDI: 0000000000000003 RBP: 00007f1b32ed00a0 R08: 0000000000000651 R09: 0000000000000000 R10: 00007fffa4687720 R11: 0000000000000246 R12: 00007f1b32ed0130 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 5014: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:985 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:998 kmalloc include/linux/slab.h:586 [inline] hfsplus_find_init+0x85/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_readdir+0x20e/0x1310 fs/hfsplus/dir.c:144 iterate_dir+0x231/0x5a0 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492 __call_rcu_common kernel/rcu/tree.c:2649 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:2763 netlink_release+0x146a/0x18f0 net/netlink/af_netlink.c:828 __sock_release net/socket.c:654 [inline] sock_close+0xd1/0x230 net/socket.c:1386 __fput+0x3f8/0x950 fs/file_table.c:384 task_work_run+0x24a/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888015e8d000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 0 bytes to the right of allocated 1036-byte region [ffff888015e8d000, ffff888015e8d40c) The buggy address belongs to the physical page: page:ffffea000057a200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x15e88 head:ffffea000057a200 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888012842000 ffffea000050e200 dead000000000002 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 3055971456, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x31e8/0x3370 mm/page_alloc.c:3221 __alloc_pages+0x255/0x670 mm/page_alloc.c:4477 alloc_page_interleave+0x22/0x1d0 mm/mempolicy.c:2112 alloc_slab_page+0x6a/0x160 mm/slub.c:1862 allocate_slab mm/slub.c:2009 [inline] new_slab+0x84/0x2f0 mm/slub.c:2062 ___slab_alloc+0xade/0x1100 mm/slub.c:3215 __slab_alloc mm/slub.c:3314 [inline] __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] __kmem_cache_alloc_node+0x1af/0x270 mm/slub.c:3509 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1076 kmalloc include/linux/slab.h:582 [inline] kzalloc include/linux/slab.h:703 [inline] acpi_os_allocate_zeroed include/acpi/platform/aclinuxex.h:57 [inline] acpi_ds_create_walk_state+0x103/0x2a0 drivers/acpi/acpica/dswstate.c:518 acpi_ds_call_control_method+0x136/0x7b0 drivers/acpi/acpica/dsmethod.c:498 acpi_ps_parse_aml+0x2df/0x960 drivers/acpi/acpica/psparse.c:503 acpi_ps_execute_method+0x744/0x870 drivers/acpi/acpica/psxface.c:190 acpi_ns_evaluate+0x5df/0xa40 drivers/acpi/acpica/nseval.c:205 acpi_evaluate_object+0x59b/0xaf0 drivers/acpi/acpica/nsxfeval.c:354 acpi_evaluate_integer+0x11b/0x2f0 drivers/acpi/utils.c:260 page_owner free stack trace missing Memory state around the buggy address: ffff888015e8d300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888015e8d380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888015e8d400: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888015e8d480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888015e8d500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================