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 ffff88801bad240c by task syz-executor.4/11404 CPU: 0 PID: 11404 Comm: syz-executor.4 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/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+0x65e/0x820 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:394 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb17b47cea9 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:00007fb17c2060c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007fb17b5b4050 RCX: 00007fb17b47cea9 RDX: 0000000000001000 RSI: 0000000020000f80 RDI: 0000000000000009 RBP: 00007fb17b4ebff4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fb17b5b4050 R15: 00007ffff96d0608 Allocated by task 11404: 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:4122 [inline] __kmalloc_noprof+0x1f9/0x400 mm/slub.c:4135 kmalloc_noprof include/linux/slab.h:664 [inline] hfsplus_find_init+0x85/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_readdir+0x20e/0x1320 fs/hfsplus/dir.c:144 iterate_dir+0x65e/0x820 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:394 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88801bad2000 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 [ffff88801bad2000, ffff88801bad240c) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1bad0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 00fff00000000040 ffff888015042000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080080008 00000001ffffefff 0000000000000000 head: 00fff00000000040 ffff888015042000 dead000000000100 dead000000000122 head: 0000000000000000 0000000080080008 00000001ffffefff 0000000000000000 head: 00fff00000000003 ffffea00006eb401 ffffffffffffffff 0000000000000000 head: 0000000000000008 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 9398, tgid 9398 (syz-executor.4), ts 455502266580, free_ts 454051136635 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x2e43/0x2f00 mm/page_alloc.c:3420 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4678 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2265 allocate_slab+0x5a/0x2f0 mm/slub.c:2428 new_slab mm/slub.c:2481 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3667 __slab_alloc+0x58/0xa0 mm/slub.c:3757 __slab_alloc_node mm/slub.c:3810 [inline] slab_alloc_node mm/slub.c:3989 [inline] kmalloc_trace_noprof+0x1d5/0x2c0 mm/slub.c:4148 kmalloc_noprof include/linux/slab.h:660 [inline] rtnl_newlink+0xf2/0x20a0 net/core/rtnetlink.c:3739 rtnetlink_rcv_msg+0x89b/0x1180 net/core/rtnetlink.c:6635 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2564 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x8db/0xcb0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 __sys_sendto+0x3a4/0x4f0 net/socket.c:2192 __do_sys_sendto net/socket.c:2204 [inline] __se_sys_sendto net/socket.c:2200 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2200 page last free pid 9492 tgid 9487 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0xd19/0xea0 mm/page_alloc.c:2583 __folio_put+0x3b9/0x620 mm/swap.c:129 skb_page_unref include/linux/skbuff_ref.h:44 [inline] __skb_frag_unref include/linux/skbuff_ref.h:57 [inline] skb_release_data+0x467/0x880 net/core/skbuff.c:1102 skb_release_all net/core/skbuff.c:1173 [inline] __napi_kfree_skb net/core/skbuff.c:1451 [inline] kfree_skb_napi_cache net/core/skbuff.c:7007 [inline] skb_attempt_defer_free+0x42f/0x5c0 net/core/skbuff.c:7029 tcp_eat_recv_skb net/ipv4/tcp.c:1520 [inline] tcp_recvmsg_locked+0x1500/0x2640 net/ipv4/tcp.c:2544 tcp_recvmsg+0x25d/0x920 net/ipv4/tcp.c:2590 inet_recvmsg+0x150/0x2d0 net/ipv4/af_inet.c:885 sock_recvmsg_nosec net/socket.c:1046 [inline] sock_recvmsg+0x1ae/0x280 net/socket.c:1068 ____sys_recvmsg+0x1db/0x470 net/socket.c:2804 ___sys_recvmsg net/socket.c:2846 [inline] __sys_recvmsg+0x2f0/0x3e0 net/socket.c:2876 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88801bad2300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801bad2380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801bad2400: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801bad2480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801bad2500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================