loop0: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x910/0xa20 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff88801c1c3a18 by task syz-executor233/5188 CPU: 0 PID: 5188 Comm: syz-executor233 Not tainted 6.9.0-rc6-syzkaller-00053-g0106679839f7 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 hfsplus_uni2asc+0x910/0xa20 fs/hfsplus/unicode.c:179 hfsplus_listxattr+0x6e6/0xe20 fs/hfsplus/xattr.c:736 vfs_listxattr+0xb7/0x140 fs/xattr.c:493 listxattr+0x69/0x190 fs/xattr.c:840 path_listxattr+0xc3/0x160 fs/xattr.c:864 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6d91f6c5f9 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:00007fffe7636d68 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3 RAX: ffffffffffffffda RBX: 00007fffe7636f48 RCX: 00007f6d91f6c5f9 RDX: 0000000000000019 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f6d91fdf610 R08: 0000000000000603 R09: 0000000000000000 R10: 00007fffe7636c30 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fffe7636f38 R14: 0000000000000001 R15: 0000000000000001 Allocated by task 5188: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:3966 [inline] __kmalloc+0x1f9/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] hfsplus_find_init+0x95/0x200 fs/hfsplus/bfind.c:21 hfsplus_listxattr+0x46d/0xe20 fs/hfsplus/xattr.c:695 vfs_listxattr+0xb7/0x140 fs/xattr.c:493 listxattr+0x69/0x190 fs/xattr.c:840 path_listxattr+0xc3/0x160 fs/xattr.c:864 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88801c1c3800 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 [ffff88801c1c3800, ffff88801c1c3a18) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1c1c0 head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888015042dc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 head: 00fff00000000840 ffff888015042dc0 dead000000000122 0000000000000000 head: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 head: 00fff00000000003 ffffea0000707001 dead000000000122 00000000ffffffff head: 0000000800000000 0000000000000000 00000000ffffffff 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 5188, tgid -1405818305 (sh), ts 5188, free_ts 49890134624 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3317 __alloc_pages+0x22b/0x2460 mm/page_alloc.c:4575 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2175 [inline] allocate_slab mm/slub.c:2338 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2391 ___slab_alloc+0x66d/0x1790 mm/slub.c:3525 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3610 __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc+0x3b4/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] kzalloc include/linux/slab.h:749 [inline] tomoyo_init_log+0x13ca/0x2180 security/tomoyo/audit.c:275 tomoyo_supervisor+0x30c/0xea0 security/tomoyo/common.c:2089 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x193/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0xef9/0x2020 security/tomoyo/domain.c:878 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline] tomoyo_bprm_check_security+0x12e/0x1d0 security/tomoyo/tomoyo.c:92 security_bprm_check+0x65/0xb0 security/security.c:1191 search_binary_handler fs/exec.c:1766 [inline] exec_binprm fs/exec.c:1820 [inline] bprm_execve fs/exec.c:1872 [inline] bprm_execve+0x642/0x19b0 fs/exec.c:1848 do_execveat_common.isra.0+0x5cb/0x750 fs/exec.c:1979 do_execve fs/exec.c:2053 [inline] __do_sys_execve fs/exec.c:2129 [inline] __se_sys_execve fs/exec.c:2124 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2124 page last free pid 5185 tgid 5185 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2347 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2487 __folio_put_small mm/swap.c:119 [inline] __folio_put+0x166/0x290 mm/swap.c:142 folio_put include/linux/mm.h:1508 [inline] put_page include/linux/mm.h:1580 [inline] anon_pipe_buf_release+0x3fa/0x4b0 fs/pipe.c:128 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_update_tail fs/pipe.c:224 [inline] pipe_read+0x647/0x1400 fs/pipe.c:344 call_read_iter include/linux/fs.h:2104 [inline] new_sync_read fs/read_write.c:395 [inline] vfs_read+0x9fd/0xb80 fs/read_write.c:476 ksys_read+0x1f8/0x260 fs/read_write.c:619 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88801c1c3900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801c1c3980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801c1c3a00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801c1c3a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801c1c3b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================