================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x8fd/0xa00 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff88807a7f5218 by task syz-executor262/5067 CPU: 0 PID: 5067 Comm: syz-executor262 Not tainted 6.7.0-rc4-syzkaller-00358-gf2e8a57ee903 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/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:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fb95c3b25b9 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:00007fffe6332088 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3 RAX: ffffffffffffffda RBX: 00007fffe6332268 RCX: 00007fb95c3b25b9 RDX: 0000000000000019 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007fb95c425610 R08: 0000000000000603 R09: 0000000000000000 R10: 00007fffe6331f50 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fffe6332258 R14: 0000000000000001 R15: 0000000000000001 Allocated by task 5067: 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+0xa3/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0x59/0x90 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [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:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88807a7f5000 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 [ffff88807a7f5000, ffff88807a7f5218) The buggy address belongs to the physical page: page:ffffea0001e9fd40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a7f5 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x2() raw: 00fff00000000800 ffff888013040700 ffffea0001e81d10 ffffea0001e9d750 raw: 0000000000000000 ffff88807a7f5000 0000000100000002 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 0x2420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 4594, tgid 4594 (udevd), ts 51156367647, free_ts 51014087839 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 __alloc_pages_node include/linux/gfp.h:238 [inline] kmem_getpages mm/slab.c:1356 [inline] cache_grow_begin+0x99/0x3a0 mm/slab.c:2550 cache_alloc_refill+0x295/0x3b0 mm/slab.c:2923 ____cache_alloc mm/slab.c:2999 [inline] ____cache_alloc mm/slab.c:2982 [inline] __do_cache_alloc mm/slab.c:3182 [inline] slab_alloc_node mm/slab.c:3230 [inline] __kmem_cache_alloc_node+0x3ba/0x460 mm/slab.c:3521 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc+0x49/0x90 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] load_elf_phdrs+0x103/0x210 fs/binfmt_elf.c:526 load_elf_binary+0x1fe/0x4e30 fs/binfmt_elf.c:855 search_binary_handler fs/exec.c:1737 [inline] exec_binprm fs/exec.c:1779 [inline] bprm_execve fs/exec.c:1854 [inline] bprm_execve+0x7f9/0x1a90 fs/exec.c:1810 do_execveat_common.isra.0+0x5d3/0x740 fs/exec.c:1962 do_execve fs/exec.c:2036 [inline] __do_sys_execve fs/exec.c:2112 [inline] __se_sys_execve fs/exec.c:2107 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2107 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487 slab_destroy mm/slab.c:1608 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1628 cache_flusharray mm/slab.c:3341 [inline] ___cache_free+0x2b7/0x420 mm/slab.c:3404 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4c/0x1b0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] slab_alloc_node mm/slab.c:3237 [inline] kmem_cache_alloc_node+0x173/0x4a0 mm/slab.c:3509 __alloc_skb+0x287/0x330 net/core/skbuff.c:641 alloc_skb include/linux/skbuff.h:1286 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1214 [inline] netlink_sendmsg+0x9c6/0xe40 net/netlink/af_netlink.c:1885 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2584 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2638 __sys_sendmsg+0x117/0x1e0 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff88807a7f5100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807a7f5180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807a7f5200: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807a7f5280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807a7f5300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================