================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x576/0x11f0 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff88805f38840c by task syz-executor.3/4430 CPU: 1 PID: 4430 Comm: syz-executor.3 Not tainted 5.15.155-syzkaller #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+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 hfsplus_uni2asc+0x576/0x11f0 fs/hfsplus/unicode.c:179 hfsplus_readdir+0x90c/0x12f0 fs/hfsplus/dir.c:207 iterate_dir+0x224/0x570 __do_sys_getdents fs/readdir.c:286 [inline] __se_sys_getdents+0x1e8/0x4c0 fs/readdir.c:271 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f27ca1b2e69 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:00007f27c87250c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f27ca2e0f80 RCX: 00007f27ca1b2e69 RDX: 0000000000000090 RSI: 0000000020000180 RDI: 0000000000000004 RBP: 00007f27ca1ff47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f27ca2e0f80 R15: 00007ffe50981ce8 Allocated by task 4430: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc+0x168/0x300 mm/slub.c:4407 kmalloc include/linux/slab.h:596 [inline] hfsplus_find_init+0x81/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_readdir+0x204/0x12f0 fs/hfsplus/dir.c:144 iterate_dir+0x224/0x570 __do_sys_getdents fs/readdir.c:286 [inline] __se_sys_getdents+0x1e8/0x4c0 fs/readdir.c:271 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88805f388000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1036 bytes inside of 2048-byte region [ffff88805f388000, ffff88805f388800) The buggy address belongs to the page: page:ffffea00017ce200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5f388 head:ffffea00017ce200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff80000010200(slab|head|node=0|zone=1|lastcpupid=0xfff) raw: 00fff80000010200 0000000000000000 0000000300000001 ffff888011c42000 raw: 0000000000000000 0000000000080008 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 0xd28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3529, ts 48283733525, free_ts 11536075762 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] __kmalloc_node_track_caller+0x1f6/0x390 mm/slub.c:4958 kmalloc_reserve net/core/skbuff.c:356 [inline] pskb_expand_head+0x111/0x1130 net/core/skbuff.c:1703 netlink_trim+0x183/0x220 net/netlink/af_netlink.c:1312 netlink_broadcast_filtered+0x62/0x11a0 net/netlink/af_netlink.c:1517 netlink_broadcast net/netlink/af_netlink.c:1562 [inline] nlmsg_multicast include/net/netlink.h:1033 [inline] nlmsg_notify+0xf7/0x1b0 net/netlink/af_netlink.c:2548 rtnl_notify net/core/rtnetlink.c:730 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3887 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3902 [inline] rtnetlink_event+0x155/0x1b0 net/core/rtnetlink.c:5680 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2018 [inline] call_netdevice_notifiers_extack net/core/dev.c:2030 [inline] call_netdevice_notifiers net/core/dev.c:2044 [inline] dev_set_mac_address+0x325/0x470 net/core/dev.c:9074 dev_set_mac_address_user+0x2d/0x50 net/core/dev.c:9088 do_setlink+0x897/0x3ae0 net/core/rtnetlink.c:2696 __rtnl_newlink net/core/rtnetlink.c:3429 [inline] rtnl_newlink+0x17a4/0x2070 net/core/rtnetlink.c:3549 rtnetlink_rcv_msg+0x993/0xee0 net/core/rtnetlink.c:5629 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 free_contig_range+0x95/0xf0 mm/page_alloc.c:9342 destroy_args+0xfe/0x980 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x40d/0x470 mm/debug_vm_pgtable.c:1331 do_one_initcall+0x22b/0x7a0 init/main.c:1300 do_initcall_level+0x157/0x210 init/main.c:1373 do_initcalls+0x49/0x90 init/main.c:1389 kernel_init_freeable+0x425/0x5c0 init/main.c:1613 kernel_init+0x19/0x290 init/main.c:1504 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300 Memory state around the buggy address: ffff88805f388300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805f388380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805f388400: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805f388480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805f388500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================