memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5976 'syz-executor415' loop0: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x624/0x1018 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff0000d4ca540c by task syz-executor415/5976 CPU: 1 PID: 5976 Comm: syz-executor415 Not tainted 6.4.0-rc7-syzkaller-ge40939bbfc68 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x174/0x514 mm/kasan/report.c:462 kasan_report+0xd4/0x130 mm/kasan/report.c:572 __asan_report_load2_noabort+0x20/0x2c mm/kasan/report_generic.c:379 hfsplus_uni2asc+0x624/0x1018 fs/hfsplus/unicode.c:179 hfsplus_readdir+0x7a0/0xf28 fs/hfsplus/dir.c:207 iterate_dir+0x1f4/0x4e4 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:354 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x244 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:191 el0_svc+0x4c/0x160 arch/arm64/kernel/entry-common.c:647 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:665 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Allocated by task 5976: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:510 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0xcc/0x1b8 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] hfsplus_find_init+0x84/0x1bc fs/hfsplus/bfind.c:21 hfsplus_readdir+0x1c8/0xf28 fs/hfsplus/dir.c:144 iterate_dir+0x1f4/0x4e4 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:354 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x244 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:191 el0_svc+0x4c/0x160 arch/arm64/kernel/entry-common.c:647 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:665 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:491 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:501 __call_rcu_common kernel/rcu/tree.c:2627 [inline] call_rcu+0x104/0xaf4 kernel/rcu/tree.c:2741 netlink_release+0x12c0/0x1818 net/netlink/af_netlink.c:828 __sock_release net/socket.c:653 [inline] sock_close+0xb8/0x1fc net/socket.c:1397 __fput+0x30c/0x7bc fs/file_table.c:321 ____fput+0x20/0x30 fs/file_table.c:349 task_work_run+0x230/0x2e0 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x2180/0x3c90 arch/arm64/kernel/signal.c:1305 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:144 [inline] el0_svc+0x94/0x160 arch/arm64/kernel/entry-common.c:648 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:665 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 The buggy address belongs to the object at ffff0000d4ca5000 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 [ffff0000d4ca5000, ffff0000d4ca540c) The buggy address belongs to the physical page: page:0000000031fd1cb0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x114ca0 head:0000000031fd1cb0 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000010200 ffff0000c0002900 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d4ca5300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000d4ca5380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000d4ca5400: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000d4ca5480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d4ca5500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================