================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x624/0x1018 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff0000cb906a18 by task syz.1.356/6639 CPU: 0 PID: 6639 Comm: syz.1.356 Not tainted 6.1.124-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:427 kasan_report+0xd4/0x130 mm/kasan/report.c:531 __asan_report_load2_noabort+0x2c/0x38 mm/kasan/report_generic.c:349 hfsplus_uni2asc+0x624/0x1018 fs/hfsplus/unicode.c:179 hfsplus_listxattr+0x5bc/0xc9c fs/hfsplus/xattr.c:736 vfs_listxattr fs/xattr.c:457 [inline] listxattr+0x29c/0x3cc fs/xattr.c:804 path_listxattr fs/xattr.c:828 [inline] __do_sys_listxattr fs/xattr.c:840 [inline] __se_sys_listxattr fs/xattr.c:837 [inline] __arm64_sys_listxattr+0x13c/0x21c fs/xattr.c:837 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 6639: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xd8/0x1c4 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] hfsplus_find_init+0x84/0x1bc fs/hfsplus/bfind.c:21 hfsplus_listxattr+0x31c/0xc9c fs/hfsplus/xattr.c:696 vfs_listxattr fs/xattr.c:457 [inline] listxattr+0x29c/0x3cc fs/xattr.c:804 path_listxattr fs/xattr.c:828 [inline] __do_sys_listxattr fs/xattr.c:840 [inline] __se_sys_listxattr fs/xattr.c:837 [inline] __arm64_sys_listxattr+0x13c/0x21c fs/xattr.c:837 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 kvfree_call_rcu+0xb4/0x714 kernel/rcu/tree.c:3401 neigh_destroy+0x470/0x6b0 net/core/neighbour.c:918 neigh_release include/net/neighbour.h:447 [inline] neigh_cleanup_and_release+0x15c/0x414 net/core/neighbour.c:103 neigh_flush_dev+0x180/0x7c4 net/core/neighbour.c:429 __neigh_ifdown+0x58/0x38c net/core/neighbour.c:446 neigh_ifdown+0x2c/0x40 net/core/neighbour.c:464 arp_ifdown+0x28/0x38 net/ipv4/arp.c:1316 fib_disable_ip net/ipv4/fib_frontend.c:1429 [inline] fib_inetaddr_event+0x288/0x2fc net/ipv4/fib_frontend.c:1454 notifier_call_chain kernel/notifier.c:87 [inline] blocking_notifier_call_chain+0xf0/0x198 kernel/notifier.c:382 __inet_del_ifa+0x764/0xe50 net/ipv4/devinet.c:446 inet_del_ifa net/ipv4/devinet.c:483 [inline] inetdev_destroy net/ipv4/devinet.c:323 [inline] inetdev_event+0x444/0x1214 net/ipv4/devinet.c:1615 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1970 [inline] call_netdevice_notifiers_mtu+0x16c/0x208 net/core/dev.c:2045 dev_set_mtu_ext+0x3c4/0x540 net/core/dev.c:8737 do_setlink+0x7f8/0x3318 net/core/rtnetlink.c:2793 rtnl_setlink+0x37c/0x464 net/core/rtnetlink.c:3121 rtnetlink_rcv_msg+0x72c/0xd94 net/core/rtnetlink.c:6150 netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2493 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6168 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x65c/0x898 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x834/0xb18 net/netlink/af_netlink.c:1859 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] sock_write_iter+0x2d8/0x414 net/socket.c:1143 do_iter_write+0x534/0x964 fs/read_write.c:861 vfs_writev fs/read_write.c:934 [inline] do_writev+0x220/0x3ec fs/read_write.c:977 __do_sys_writev fs/read_write.c:1050 [inline] __se_sys_writev fs/read_write.c:1047 [inline] __arm64_sys_writev+0x80/0x94 fs/read_write.c:1047 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff0000cb906800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 536 bytes inside of 1024-byte region [ffff0000cb906800, ffff0000cb906c00) The buggy address belongs to the physical page: page:00000000e515b9b9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10b900 head:00000000e515b9b9 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 dead000000000001 ffff0000c0002780 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cb906900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000cb906980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000cb906a00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000cb906a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cb906b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================