================================================================== BUG: KASAN: slab-out-of-bounds in hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 Read of size 2 at addr ffff888023309820 by task syz-executor.0/10655 CPU: 1 PID: 10655 Comm: syz-executor.0 Not tainted 6.1.0-rc5-syzkaller-00241-gab290eaddc4c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x1f0 mm/kasan/report.c:395 kasan_report+0xcd/0x100 mm/kasan/report.c:495 hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 indx_find+0x4ff/0xb20 fs/ntfs3/index.c:1085 dir_search_u+0x161/0x320 fs/ntfs3/dir.c:254 ntfs_lookup+0x112/0x1b0 fs/ntfs3/namei.c:83 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10e6/0x2df0 fs/namei.c:3710 do_filp_open+0x264/0x4f0 fs/namei.c:3740 do_sys_openat2+0x124/0x4e0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_creat fs/open.c:1402 [inline] __se_sys_creat fs/open.c:1396 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1396 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:0x7f543888b639 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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:00007f543957e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f54389abf80 RCX: 00007f543888b639 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000040 RBP: 00007f54388e6ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffec61402df R14: 00007f543957e300 R15: 0000000000022000 Allocated by task 3667: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 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] kzalloc include/linux/slab.h:689 [inline] __register_sysctl_table+0x152/0x11e0 fs/proc/proc_sysctl.c:1337 __addrconf_sysctl_register+0x25e/0x3b0 net/ipv6/addrconf.c:7083 addrconf_sysctl_register+0x128/0x180 net/ipv6/addrconf.c:7130 ipv6_add_dev+0xb9d/0x1150 net/ipv6/addrconf.c:450 ipv6_find_idev+0xa3/0x1b0 net/ipv6/addrconf.c:488 inet6_rtm_newaddr+0x634/0x2080 net/ipv6/addrconf.c:4908 rtnetlink_rcv_msg+0x772/0xe60 net/core/rtnetlink.c:6091 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2540 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7e7/0x9c0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x9b3/0xcd0 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] __sys_sendto+0x46e/0x5f0 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2125 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 The buggy address belongs to the object at ffff888023309000 which belongs to the cache kmalloc-cg-2k of size 2048 The buggy address is located 32 bytes to the right of 2048-byte region [ffff888023309000, ffff888023309800) The buggy address belongs to the physical page: page:ffffea00008cc200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802330b000 pfn:0x23308 head:ffffea00008cc200 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff888021df5881 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000612808 ffffea0001e86808 ffff88801284c140 raw: ffff88802330b000 0000000000080005 00000001ffffffff ffff888021df5881 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3667, tgid 3667 (syz-executor.2), ts 198372963499, free_ts 186153688446 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4288 __alloc_pages+0x259/0x560 mm/page_alloc.c:5555 alloc_slab_page+0x70/0xf0 mm/slub.c:1794 allocate_slab+0x5e/0x4b0 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x782/0xe20 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x252/0x310 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0x9c/0x190 mm/slab_common.c:975 kmemdup+0x26/0x60 mm/util.c:129 _Z7kmemdupPKvU17pass_object_size0mj include/linux/fortify-string.h:585 [inline] neigh_sysctl_register+0x9c/0x4f0 net/core/neighbour.c:3790 addrconf_sysctl_register+0xac/0x180 net/ipv6/addrconf.c:7126 ipv6_add_dev+0xb9d/0x1150 net/ipv6/addrconf.c:450 ipv6_find_idev+0xa3/0x1b0 net/ipv6/addrconf.c:488 inet6_rtm_newaddr+0x634/0x2080 net/ipv6/addrconf.c:4908 rtnetlink_rcv_msg+0x772/0xe60 net/core/rtnetlink.c:6091 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2540 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7e7/0x9c0 net/netlink/af_netlink.c:1345 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+0x80c/0x8f0 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x7d/0x5f0 mm/page_alloc.c:3483 free_slab mm/slub.c:2031 [inline] discard_slab mm/slub.c:2037 [inline] __unfreeze_partials+0x1ab/0x200 mm/slub.c:2586 put_cpu_partial+0x106/0x170 mm/slub.c:2662 qlist_free_all+0x2b/0x70 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x169/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] kmem_cache_alloc_node+0x1ca/0x340 mm/slub.c:3443 __alloc_skb+0xcf/0x2b0 net/core/skbuff.c:497 alloc_skb_fclone include/linux/skbuff.h:1317 [inline] tcp_stream_alloc_skb+0x3c/0x300 net/ipv4/tcp.c:862 tcp_sendmsg_locked+0xd70/0x40d0 net/ipv4/tcp.c:1325 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1483 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] sock_write_iter+0x3d4/0x540 net/socket.c:1108 call_write_iter include/linux/fs.h:2191 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7dc/0xc50 fs/read_write.c:584 ksys_write+0x177/0x2a0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 Memory state around the buggy address: ffff888023309700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888023309780: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888023309800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888023309880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888023309900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================