loop4: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x57f/0x1200 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff888023c2340c by task syz-executor.4/5903 CPU: 0 PID: 5903 Comm: syz-executor.4 Not tainted 6.9.0-rc4-syzkaller-00214-g13a2e429f644 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 hfsplus_uni2asc+0x57f/0x1200 fs/hfsplus/unicode.c:179 hfsplus_readdir+0x93b/0x1320 fs/hfsplus/dir.c:207 iterate_dir+0x539/0x6f0 fs/readdir.c:110 __do_sys_getdents fs/readdir.c:326 [inline] __se_sys_getdents+0x1ef/0x4d0 fs/readdir.c:311 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcbed27dea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcbee0c20c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007fcbed3abf80 RCX: 00007fcbed27dea9 RDX: 000000000000008c RSI: 0000000020000140 RDI: 0000000000000006 RBP: 00007fcbed2ca4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fcbed3abf80 R15: 00007ffebe99b818 Allocated by task 5903: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:3966 [inline] __kmalloc+0x233/0x4a0 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] hfsplus_find_init+0x85/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_readdir+0x20e/0x1320 fs/hfsplus/dir.c:144 iterate_dir+0x539/0x6f0 fs/readdir.c:110 __do_sys_getdents fs/readdir.c:326 [inline] __se_sys_getdents+0x1ef/0x4d0 fs/readdir.c:311 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888023c23000 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 [ffff888023c23000, ffff888023c2340c) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23c20 head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff80000000840(slab|head|node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffffff() raw: 00fff80000000840 ffff888015042000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 head: 00fff80000000840 ffff888015042000 dead000000000100 dead000000000122 head: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 head: 00fff80000000003 ffffea00008f0801 ffffea00008f0848 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4513, tgid -878045993 (klogd), ts 4513, free_ts 71725684294 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0x3410/0x35b0 mm/page_alloc.c:3317 __alloc_pages+0x256/0x6c0 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+0x5f/0x160 mm/slub.c:2175 allocate_slab mm/slub.c:2338 [inline] new_slab+0x84/0x2f0 mm/slub.c:2391 ___slab_alloc+0xc73/0x1260 mm/slub.c:3525 __slab_alloc mm/slub.c:3610 [inline] __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] kmalloc_trace+0x269/0x360 mm/slub.c:3992 kmalloc include/linux/slab.h:628 [inline] syslog_print+0x121/0x9c0 kernel/printk/printk.c:1556 do_syslog+0x3bb/0x810 kernel/printk/printk.c:1734 __do_sys_syslog kernel/printk/printk.c:1826 [inline] __se_sys_syslog kernel/printk/printk.c:1824 [inline] __x64_sys_syslog+0x7c/0x90 kernel/printk/printk.c:1824 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5067 tgid 5064 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+0x97b/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 discard_slab mm/slub.c:2437 [inline] __put_partials+0xeb/0x130 mm/slub.c:2906 put_cpu_partial+0x17c/0x250 mm/slub.c:2981 __slab_free+0x2ea/0x3d0 mm/slub.c:4151 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x5e/0xc0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_kmalloc+0x23/0xb0 mm/kasan/common.c:378 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:3966 [inline] __kmalloc_node+0x253/0x4e0 mm/slub.c:3973 kmalloc_node include/linux/slab.h:648 [inline] kvmalloc_node+0x72/0x190 mm/util.c:634 kvmalloc include/linux/slab.h:766 [inline] seq_buf_alloc fs/seq_file.c:38 [inline] seq_read_iter+0x202/0xd60 fs/seq_file.c:210 call_read_iter include/linux/fs.h:2104 [inline] new_sync_read fs/read_write.c:395 [inline] vfs_read+0x97b/0xb70 fs/read_write.c:476 ksys_read+0x1a0/0x2c0 fs/read_write.c:619 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888023c23300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888023c23380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888023c23400: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888023c23480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888023c23500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================