loop0: 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 ffff88801a7bb218 by task syz-executor.0/5475 CPU: 0 PID: 5475 Comm: syz-executor.0 Not tainted 6.7.0-rc1-syzkaller-00012-g9bacdd8996c7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x15f/0x540 mm/kasan/report.c:475 kasan_report+0x13e/0x170 mm/kasan/report.c:588 hfsplus_uni2asc+0x576/0x11f0 fs/hfsplus/unicode.c:179 hfsplus_listxattr+0x70a/0xf00 fs/hfsplus/xattr.c:736 vfs_listxattr fs/xattr.c:494 [inline] listxattr+0x103/0x280 fs/xattr.c:841 path_listxattr fs/xattr.c:865 [inline] __do_sys_llistxattr fs/xattr.c:883 [inline] __se_sys_llistxattr fs/xattr.c:880 [inline] __x64_sys_llistxattr+0x16f/0x230 fs/xattr.c:880 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f8d73a7c959 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:00007f8d748290c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3 RAX: ffffffffffffffda RBX: 00007f8d73b9bf80 RCX: 00007f8d73a7c959 RDX: 0000000000000019 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f8d73ad8c88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f8d73b9bf80 R15: 00007ffc88c14088 Allocated by task 5475: 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+0x94/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0xb5/0x220 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] hfsplus_find_init+0x81/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_listxattr+0x3bd/0xf00 fs/hfsplus/xattr.c:695 vfs_listxattr fs/xattr.c:494 [inline] listxattr+0x103/0x280 fs/xattr.c:841 path_listxattr fs/xattr.c:865 [inline] __do_sys_llistxattr fs/xattr.c:883 [inline] __se_sys_llistxattr fs/xattr.c:880 [inline] __x64_sys_llistxattr+0x16f/0x230 fs/xattr.c:880 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492 kvfree_call_rcu+0xf4/0x790 kernel/rcu/tree.c:3400 neigh_flush_dev+0x188/0xae0 net/core/neighbour.c:422 __neigh_ifdown+0x45/0x3f0 net/core/neighbour.c:439 neigh_carrier_down+0x1e/0x30 net/core/neighbour.c:450 ndisc_netdev_event+0x3d3/0x4b0 net/ipv6/ndisc.c:1903 notifier_call_chain+0x18c/0x3a0 kernel/notifier.c:93 netdev_state_change+0x11b/0x190 net/core/dev.c:1347 linkwatch_do_dev+0x10c/0x160 net/core/link_watch.c:182 __linkwatch_run_queue+0x44b/0x6c0 net/core/link_watch.c:235 linkwatch_event+0x48/0x50 net/core/link_watch.c:278 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x90b/0x1400 kernel/workqueue.c:2703 worker_thread+0xa5b/0xff0 kernel/workqueue.c:2784 kthread+0x2cf/0x360 kernel/kthread.c:388 ret_from_fork+0x44/0x70 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 The buggy address belongs to the object at ffff88801a7bb000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes to the right of allocated 536-byte region [ffff88801a7bb000, ffff88801a7bb218) The buggy address belongs to the physical page: page:ffffea000069ee00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a7b8 head:ffffea000069ee00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012841dc0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5058, tgid 5058 (syz-executor.0), ts 51438916908, free_ts 51266048326 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1d2/0x1f0 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0x3376/0x3500 mm/page_alloc.c:3312 __alloc_pages+0x251/0x660 mm/page_alloc.c:4568 alloc_pages_mpol+0x3da/0x640 mm/mempolicy.c:2133 alloc_slab_page+0x6a/0x150 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x84/0x2d0 mm/slub.c:2070 ___slab_alloc+0xc75/0x1300 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x215/0x2f0 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc_node_track_caller+0xa1/0x220 mm/slab_common.c:1027 kmalloc_reserve+0xf3/0x260 net/core/skbuff.c:582 __alloc_skb+0x1ad/0x410 net/core/skbuff.c:651 alloc_skb include/linux/skbuff.h:1286 [inline] nlmsg_new include/net/netlink.h:1010 [inline] inet6_rt_notify+0xdc/0x280 net/ipv6/route.c:6171 fib6_add_rt2node net/ipv6/ip6_fib.c:1257 [inline] fib6_add+0x1e0d/0x3f90 net/ipv6/ip6_fib.c:1483 __ip6_ins_rt net/ipv6/route.c:1303 [inline] ip6_route_add+0x84/0x120 net/ipv6/route.c:3847 addrconf_prefix_route net/ipv6/addrconf.c:2445 [inline] fixup_permanent_addr net/ipv6/addrconf.c:3549 [inline] addrconf_permanent_addr+0x795/0xc00 net/ipv6/addrconf.c:3573 addrconf_notify+0x8d2/0xfe0 net/ipv6/addrconf.c:3645 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x915/0xa30 mm/page_alloc.c:2347 free_unref_page+0x33/0x3e0 mm/page_alloc.c:2487 discard_slab mm/slub.c:2116 [inline] __unfreeze_partials+0x1dc/0x220 mm/slub.c:2655 put_cpu_partial+0x17b/0x250 mm/slub.c:2731 __slab_free+0x2b2/0x380 mm/slub.c:3679 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x75/0xd0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x147/0x160 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6c/0x3b0 mm/slab.h:763 slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x1a5/0x380 mm/slub.c:3523 __alloc_skb+0x17d/0x410 net/core/skbuff.c:641 alloc_skb include/linux/skbuff.h:1286 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1214 [inline] netlink_sendmsg+0x6f8/0xd70 net/netlink/af_netlink.c:1885 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x480/0x640 net/socket.c:2190 __do_sys_sendto net/socket.c:2202 [inline] __se_sys_sendto net/socket.c:2198 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2198 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff88801a7bb100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801a7bb180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801a7bb200: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801a7bb280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801a7bb300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================