loop3: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x576/0x11f0 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff88807b77b40c by task syz-executor.3/29285 CPU: 0 PID: 29285 Comm: syz-executor.3 Not tainted 6.1.20-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 hfsplus_uni2asc+0x576/0x11f0 fs/hfsplus/unicode.c:179 hfsplus_readdir+0x922/0x12c0 fs/hfsplus/dir.c:207 iterate_dir+0x224/0x560 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0dcec8c0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007f0dcfa09168 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f0dcedabf80 RCX: 00007f0dcec8c0f9 RDX: 0000000000000067 RSI: 0000000020000540 RDI: 0000000000000003 RBP: 00007f0dcece7b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffac9c1bcf R14: 00007f0dcfa09300 R15: 0000000000022000 Allocated by task 29285: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xaf/0x1a0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] hfsplus_find_init+0x81/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_readdir+0x207/0x12c0 fs/hfsplus/dir.c:144 iterate_dir+0x224/0x560 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 call_rcu+0x163/0xa10 kernel/rcu/tree.c:2798 netlink_release+0x1384/0x17f0 net/netlink/af_netlink.c:817 __sock_release net/socket.c:652 [inline] sock_close+0xcd/0x230 net/socket.c:1370 __fput+0x3b7/0x890 fs/file_table.c:320 task_work_run+0x246/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x60/0x2d0 kernel/entry/common.c:296 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 call_rcu+0x163/0xa10 kernel/rcu/tree.c:2798 netlink_release+0x1384/0x17f0 net/netlink/af_netlink.c:817 __sock_release net/socket.c:652 [inline] sock_close+0xcd/0x230 net/socket.c:1370 __fput+0x3b7/0x890 fs/file_table.c:320 task_work_run+0x246/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x60/0x2d0 kernel/entry/common.c:296 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88807b77b000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1036 bytes inside of 2048-byte region [ffff88807b77b000, ffff88807b77b800) The buggy address belongs to the physical page: page:ffffea0001edde00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b778 head:ffffea0001edde00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000745a00 dead000000000002 ffff888012442000 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3775, tgid 3775 (kworker/0:10), ts 259649723665, free_ts 259616366060 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x3573/0x3700 mm/page_alloc.c:4291 __alloc_pages+0x28d/0x7e0 mm/page_alloc.c:5558 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xa71/0x1080 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0x9c/0x190 mm/slab_common.c:975 kmalloc_reserve net/core/skbuff.c:437 [inline] __alloc_skb+0x126/0x620 net/core/skbuff.c:509 alloc_skb include/linux/skbuff.h:1267 [inline] alloc_skb_with_frags+0xa4/0x740 net/core/skbuff.c:6128 sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2721 sock_alloc_send_skb include/net/sock.h:1884 [inline] mld_newpack+0x1c0/0xa90 net/ipv6/mcast.c:1748 add_grhead net/ipv6/mcast.c:1851 [inline] add_grec+0x1492/0x19a0 net/ipv6/mcast.c:1989 mld_send_initial_cr+0x20f/0x3a0 net/ipv6/mcast.c:2236 ipv6_mc_dad_complete+0x84/0x390 net/ipv6/mcast.c:2247 addrconf_dad_completed+0x678/0xca0 net/ipv6/addrconf.c:4233 addrconf_dad_work+0xd8e/0x16b0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0xfe1/0x1190 mm/page_alloc.c:3387 free_unref_page+0x98/0x570 mm/page_alloc.c:3483 free_slab mm/slub.c:2031 [inline] discard_slab mm/slub.c:2037 [inline] __unfreeze_partials+0x1b7/0x210 mm/slub.c:2586 put_cpu_partial+0x116/0x180 mm/slub.c:2662 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x50/0x370 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] kmem_cache_alloc_node+0x142/0x2a0 mm/slub.c:3443 __alloc_skb+0xde/0x620 net/core/skbuff.c:497 alloc_skb include/linux/skbuff.h:1267 [inline] alloc_skb_with_frags+0xa4/0x740 net/core/skbuff.c:6128 sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2721 sock_alloc_send_skb include/net/sock.h:1884 [inline] mld_newpack+0x1c0/0xa90 net/ipv6/mcast.c:1748 add_grhead net/ipv6/mcast.c:1851 [inline] add_grec+0x1492/0x19a0 net/ipv6/mcast.c:1989 mld_send_initial_cr+0x20f/0x3a0 net/ipv6/mcast.c:2236 mld_dad_work+0x40/0x400 net/ipv6/mcast.c:2262 Memory state around the buggy address: ffff88807b77b300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807b77b380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807b77b400: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807b77b480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b77b500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================