loop0: 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 ffff88802c47140c by task syz-executor415/5058 CPU: 0 PID: 5058 Comm: syz-executor415 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/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_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:394 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7faef6d845c9 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:00007ffc0ab91ea8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007ffc0ab92078 RCX: 00007faef6d845c9 RDX: 00000000000000bd RSI: 0000000020000900 RDI: 0000000000000003 RBP: 00007faef6df8610 R08: 00000000000006e1 R09: 00007ffc0ab92078 R10: 00007ffc0ab91d60 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc0ab92068 R14: 0000000000000001 R15: 0000000000000001 Allocated by task 5058: 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_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:394 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 The buggy address belongs to the object at ffff88802c471000 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 [ffff88802c471000, ffff88802c47140c) The buggy address belongs to the physical page: page:ffffea0000b11c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c470 head:ffffea0000b11c00 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 ffff888014c42000 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 5058, tgid 5058 (syz-executor415), ts 58236471642, free_ts 52325252467 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0x33ea/0x3580 mm/page_alloc.c:3311 __alloc_pages+0x256/0x680 mm/page_alloc.c:4569 __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] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc+0x2e5/0x4a0 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] hfsplus_find_init+0x85/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_fill_super+0xda4/0x1ca0 fs/hfsplus/super.c:525 mount_bdev+0x20a/0x2d0 fs/super.c:1658 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1779 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 page last free pid 5050 tgid 5050 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x95d/0xa80 mm/page_alloc.c:2346 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2486 skb_free_frag include/linux/skbuff.h:3341 [inline] skb_free_head net/core/skbuff.c:1106 [inline] skb_release_data+0x640/0x870 net/core/skbuff.c:1136 skb_release_all net/core/skbuff.c:1202 [inline] __kfree_skb net/core/skbuff.c:1216 [inline] skb_attempt_defer_free+0x399/0x540 net/core/skbuff.c:7016 tcp_eat_recv_skb net/ipv4/tcp.c:1513 [inline] tcp_recvmsg_locked+0x149c/0x25a0 net/ipv4/tcp.c:2532 tcp_recvmsg+0x25d/0x920 net/ipv4/tcp.c:2578 inet_recvmsg+0x150/0x2d0 net/ipv4/af_inet.c:883 sock_recvmsg_nosec net/socket.c:1046 [inline] sock_recvmsg+0x1ae/0x280 net/socket.c:1068 sock_read_iter+0x2ca/0x3e0 net/socket.c:1138 call_read_iter include/linux/fs.h:2102 [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_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 Memory state around the buggy address: ffff88802c471300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802c471380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802c471400: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802c471480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802c471500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================