memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=4999 'syz-executor249' loop0: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x953/0xa50 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff888076e31218 by task syz-executor249/4999 CPU: 1 PID: 4999 Comm: syz-executor249 Not tainted 6.4.0-rc6-syzkaller-00269-g1b29d271614a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 hfsplus_uni2asc+0x953/0xa50 fs/hfsplus/unicode.c:179 hfsplus_listxattr+0x5b7/0xbe0 fs/hfsplus/xattr.c:736 vfs_listxattr+0xb7/0x130 fs/xattr.c:494 listxattr+0x70/0x180 fs/xattr.c:841 path_listxattr+0xae/0x140 fs/xattr.c:865 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f4883367779 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:00007ffc2714fec8 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4883367779 RDX: 0000000000000019 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f4883327010 R08: 0000000000000603 R09: 0000000000000000 R10: 00007ffc2714fd90 R11: 0000000000000246 R12: 00007f48833270a0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4999: kasan_save_stack+0x22/0x40 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 mm/kasan/common.c:333 [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:966 [inline] __kmalloc+0x5e/0x190 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] hfsplus_find_init+0x95/0x230 fs/hfsplus/bfind.c:21 hfsplus_listxattr+0x333/0xbe0 fs/hfsplus/xattr.c:695 vfs_listxattr+0xb7/0x130 fs/xattr.c:494 listxattr+0x70/0x180 fs/xattr.c:841 path_listxattr+0xae/0x140 fs/xattr.c:865 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888076e31000 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 [ffff888076e31000, ffff888076e31218) The buggy address belongs to the physical page: page:ffffea0001db8c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888076e37800 pfn:0x76e30 head:ffffea0001db8c00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888012441dc0 0000000000000000 0000000000000001 raw: ffff888076e37800 000000008010000b 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4671, tgid 4671 (dhcpcd), ts 20812153063, free_ts 20782987547 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3192 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3291 __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] __kmem_cache_alloc_node+0x136/0x320 mm/slub.c:3490 __do_kmalloc_node mm/slab_common.c:965 [inline] __kmalloc+0x4e/0x190 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:680 [inline] tomoyo_init_log+0x1290/0x1f00 security/tomoyo/audit.c:275 tomoyo_supervisor+0x34e/0xec0 security/tomoyo/common.c:2088 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x183/0x200 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0x148f/0x1ff0 security/tomoyo/domain.c:879 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:101 [inline] tomoyo_bprm_check_security+0x136/0x1d0 security/tomoyo/tomoyo.c:91 security_bprm_check+0x49/0xb0 security/security.c:1102 search_binary_handler fs/exec.c:1725 [inline] exec_binprm fs/exec.c:1779 [inline] bprm_execve fs/exec.c:1854 [inline] bprm_execve+0x740/0x1980 fs/exec.c:1810 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564 free_unref_page+0x33/0x370 mm/page_alloc.c:2659 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2636 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:711 [inline] slab_alloc_node mm/slub.c:3451 [inline] kmem_cache_alloc_node+0x185/0x3e0 mm/slub.c:3496 __alloc_skb+0x288/0x330 net/core/skbuff.c:644 alloc_skb include/linux/skbuff.h:1288 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1211 [inline] netlink_sendmsg+0x9b0/0xe30 net/netlink/af_netlink.c:1888 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 ____sys_sendmsg+0x71c/0x900 net/socket.c:2503 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2557 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2586 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888076e31100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888076e31180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888076e31200: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888076e31280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888076e31300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================