memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5033 'syz-executor578' loop0: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x8fd/0xa00 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff88802b693a18 by task syz-executor578/5033 CPU: 0 PID: 5033 Comm: syz-executor578 Not tainted 6.5.0-rc3-next-20230726-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_uni2asc+0x8fd/0xa00 fs/hfsplus/unicode.c:179 hfsplus_listxattr+0x6de/0xe10 fs/hfsplus/xattr.c:736 vfs_listxattr+0xb3/0x130 fs/xattr.c:494 listxattr+0x69/0x180 fs/xattr.c:841 path_listxattr+0xc3/0x160 fs/xattr.c:865 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:0x7fc356a975b9 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:00007fff03875198 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3 RAX: ffffffffffffffda RBX: 00007fff03875378 RCX: 00007fc356a975b9 RDX: 0000000000000019 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007fc356b0a610 R08: 0000000000000603 R09: 0000000000000000 R10: 00007fff03875060 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff03875368 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:196 [inline] __do_kmalloc_node mm/slab_common.c:1024 [inline] __kmalloc+0x60/0x100 mm/slab_common.c:1037 kmalloc include/linux/slab.h:603 [inline] hfsplus_find_init+0x95/0x200 fs/hfsplus/bfind.c:21 hfsplus_listxattr+0x465/0xe10 fs/hfsplus/xattr.c:695 vfs_listxattr+0xb3/0x130 fs/xattr.c:494 listxattr+0x69/0x180 fs/xattr.c:841 path_listxattr+0xc3/0x160 fs/xattr.c:865 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 The buggy address belongs to the object at ffff88802b693800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes to the right of allocated 536-byte region [ffff88802b693800, ffff88802b693a18) The buggy address belongs to the physical page: page:ffffea0000ada400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2b690 head:ffffea0000ada400 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 ffff888012841dc0 ffffea0001df5000 dead000000000002 raw: 0000000000000000 0000000080100010 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 13066280773, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1569 prep_new_page mm/page_alloc.c:1576 [inline] get_page_from_freelist+0x10d7/0x31b0 mm/page_alloc.c:3256 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4512 alloc_page_interleave+0x1e/0x250 mm/mempolicy.c:2112 alloc_pages+0x22a/0x270 mm/mempolicy.c:2274 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 __do_kmalloc_node mm/slab_common.c:1023 [inline] __kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1044 __do_krealloc mm/slab_common.c:1412 [inline] krealloc+0x5d/0x100 mm/slab_common.c:1445 add_sysfs_param+0xca/0x960 kernel/params.c:652 kernel_add_sysfs_param kernel/params.c:813 [inline] param_sysfs_builtin kernel/params.c:852 [inline] param_sysfs_builtin_init+0x2ca/0x450 kernel/params.c:986 do_one_initcall+0x117/0x630 init/main.c:1241 do_initcall_level init/main.c:1303 [inline] do_initcalls init/main.c:1319 [inline] do_basic_setup init/main.c:1338 [inline] kernel_init_freeable+0x5bd/0x8f0 init/main.c:1555 kernel_init+0x1c/0x2a0 init/main.c:1446 page_owner free stack trace missing Memory state around the buggy address: ffff88802b693900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802b693980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802b693a00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802b693a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802b693b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================