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 ffff88807b55440c by task syz-executor266/5050 CPU: 0 PID: 5050 Comm: syz-executor266 Not tainted 6.6.0-rc6-next-20231020-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/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+0xc3/0x620 mm/kasan/report.c:475 kasan_report+0xd9/0x110 mm/kasan/report.c:588 hfsplus_uni2asc+0x8fd/0xa00 fs/hfsplus/unicode.c:179 hfsplus_readdir+0x871/0xff0 fs/hfsplus/dir.c:207 iterate_dir+0x1e5/0x5b0 fs/readdir.c:106 __do_sys_getdents64 fs/readdir.c:405 [inline] __se_sys_getdents64 fs/readdir.c:390 [inline] __x64_sys_getdents64+0x14f/0x2e0 fs/readdir.c:390 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f8c80572649 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:00007ffc063d3278 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007ffc063d3448 RCX: 00007f8c80572649 RDX: 0000000000000067 RSI: 0000000020000540 RDI: 0000000000000003 RBP: 00007f8c805e5610 R08: 0000000000000651 R09: 00007ffc063d3448 R10: 00007ffc063d3130 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc063d3438 R14: 0000000000000001 R15: 0000000000000001 Allocated by task 5050: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x24/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:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0x62/0x120 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] hfsplus_find_init+0x95/0x200 fs/hfsplus/bfind.c:21 hfsplus_readdir+0x262/0xff0 fs/hfsplus/dir.c:144 iterate_dir+0x1e5/0x5b0 fs/readdir.c:106 __do_sys_getdents64 fs/readdir.c:405 [inline] __se_sys_getdents64 fs/readdir.c:390 [inline] __x64_sys_getdents64+0x14f/0x2e0 fs/readdir.c:390 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88807b554000 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 [ffff88807b554000, ffff88807b55440c) The buggy address belongs to the physical page: page:ffffea0001ed5400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b550 head:ffffea0001ed5400 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 ffff888012c42000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080080008 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 5040, tgid 5040 (sshd), ts 84955595363, free_ts 83003207436 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa16/0x3680 mm/page_alloc.c:3348 __alloc_pages+0x1cf/0x4c0 mm/page_alloc.c:4604 alloc_pages+0x1a8/0x270 mm/mempolicy.c:2283 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8bf/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+0x131/0x310 mm/slub.c:3517 kmalloc_trace+0x27/0xf0 mm/slab_common.c:1098 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] bpf_prog_alloc_no_stats+0x101/0x600 kernel/bpf/core.c:102 bpf_prog_alloc+0x3b/0x230 kernel/bpf/core.c:136 bpf_prog_create_from_user+0xb4/0x2d0 net/core/filter.c:1420 seccomp_prepare_filter kernel/seccomp.c:680 [inline] seccomp_prepare_user_filter kernel/seccomp.c:717 [inline] seccomp_set_mode_filter kernel/seccomp.c:1935 [inline] do_seccomp+0x7b2/0x2560 kernel/seccomp.c:2055 prctl_set_seccomp+0x4b/0x70 kernel/seccomp.c:2108 __do_sys_prctl+0xd0e/0x1f60 kernel/sys.c:2509 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 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+0x476/0xa40 mm/page_alloc.c:2383 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2523 __unfreeze_partials+0x21d/0x240 mm/slub.c:2655 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 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/slub.c:3478 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc+0x163/0x390 mm/slub.c:3502 kmem_cache_zalloc include/linux/slab.h:711 [inline] alloc_buffer_head+0x21/0x150 fs/buffer.c:3018 folio_alloc_buffers+0x2c8/0x7d0 fs/buffer.c:925 create_empty_buffers+0x36/0x480 fs/buffer.c:1650 ext4_block_write_begin+0xcc4/0xee0 fs/ext4/inode.c:1036 ext4_da_write_begin+0x40c/0x8b0 fs/ext4/inode.c:2900 generic_perform_write+0x277/0x600 mm/filemap.c:3918 ext4_buffered_write_iter+0x11f/0x3c0 fs/ext4/file.c:299 ext4_file_write_iter+0x832/0x19c0 fs/ext4/file.c:719 call_write_iter include/linux/fs.h:2019 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x64d/0xdf0 fs/read_write.c:584 Memory state around the buggy address: ffff88807b554300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807b554380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807b554400: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807b554480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b554500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================