================================================================== BUG: KASAN: slab-out-of-bounds in hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 Read of size 2 at addr ffff88807d380d99 by task syz-executor.3/10851 CPU: 1 PID: 10851 Comm: syz-executor.3 Not tainted 6.0.0-syzkaller-09423-g493ffd6605b2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x1f0 mm/kasan/report.c:433 kasan_report+0xc3/0xf0 mm/kasan/report.c:495 hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 indx_find+0x30d/0xb20 fs/ntfs3/index.c:1068 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:3688 do_filp_open+0x264/0x4f0 fs/namei.c:3718 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:0x7f533b68b5a9 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:00007f533c71a168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f533b7abf80 RCX: 00007f533b68b5a9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0 RBP: 00007f533b6e6580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe003e891f R14: 00007f533c71a300 R15: 0000000000022000 Allocated by task 10851: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc+0xcd/0x100 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:234 [inline] __kmalloc+0x226/0x370 mm/slub.c:4429 kmalloc include/linux/slab.h:605 [inline] mi_init+0x72/0xe0 fs/ntfs3/record.c:105 ntfs_read_mft fs/ntfs3/inode.c:53 [inline] ntfs_iget5+0x309/0x36f0 fs/ntfs3/inode.c:501 ntfs_fill_super+0x3eab/0x42a0 fs/ntfs3/super.c:1262 get_tree_bdev+0x400/0x620 fs/super.c:1323 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x289/0xad0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3568 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+0x2b/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:348 kvfree_call_rcu+0x112/0x880 kernel/rcu/tree.c:3341 neigh_del net/core/neighbour.c:225 [inline] neigh_remove_one+0x5cc/0x680 net/core/neighbour.c:246 neigh_forced_gc net/core/neighbour.c:276 [inline] neigh_alloc net/core/neighbour.c:447 [inline] ___neigh_create+0x3aa/0x21a0 net/core/neighbour.c:642 ip6_finish_output2+0x1417/0x1440 net/ipv6/ip6_output.c:125 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0xa05/0xeb0 net/ipv6/ip6_output.c:206 dst_output include/net/dst.h:445 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ndisc_send_skb+0xaba/0xfc0 net/ipv6/ndisc.c:508 addrconf_rs_timer+0x377/0x5f0 net/ipv6/addrconf.c:3931 call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers+0x772/0x980 kernel/time/timer.c:1790 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803 __do_softirq+0x277/0x738 kernel/softirq.c:571 The buggy address belongs to the object at ffff88807d380800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 409 bytes to the right of 1024-byte region [ffff88807d380800, ffff88807d380c00) The buggy address belongs to the physical page: page:ffffea0001f4e000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7d380 head:ffffea0001f4e000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001f7d600 dead000000000002 ffff888012041dc0 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 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3601, tgid 3597 (syz-fuzzer), ts 90614409715, free_ts 90597204244 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 alloc_slab_page+0x70/0xf0 mm/slub.c:1829 allocate_slab+0x5e/0x520 mm/slub.c:1974 new_slab mm/slub.c:2034 [inline] ___slab_alloc+0x3ee/0xc40 mm/slub.c:3036 __slab_alloc mm/slub.c:3123 [inline] slab_alloc_node mm/slub.c:3214 [inline] __kmalloc_node_track_caller+0x2c3/0x400 mm/slub.c:4964 kmalloc_reserve net/core/skbuff.c:437 [inline] __alloc_skb+0x112/0x2b0 net/core/skbuff.c:509 alloc_skb include/linux/skbuff.h:1265 [inline] __tcp_send_ack+0x98/0x5f0 net/ipv4/tcp_output.c:3960 tcp_ack_snd_check net/ipv4/tcp_input.c:5569 [inline] tcp_rcv_established+0xabb/0x1a10 net/ipv4/tcp_input.c:6007 tcp_v4_do_rcv+0x479/0xac0 net/ipv4/tcp_ipv4.c:1681 tcp_v4_rcv+0x2466/0x2d00 net/ipv4/tcp_ipv4.c:2100 ip_protocol_deliver_rcu+0x38d/0x750 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x269/0x480 net/ipv4/ip_input.c:233 dst_input include/net/dst.h:455 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:575 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:625 [inline] ip_sublist_rcv+0xa8b/0xb70 net/ipv4/ip_input.c:633 ip_list_rcv+0x443/0x490 net/ipv4/ip_input.c:668 __netif_receive_skb_list_ptype net/core/dev.c:5528 [inline] __netif_receive_skb_list_core+0x71e/0x930 net/core/dev.c:5576 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x812/0x900 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x7d/0x5f0 mm/page_alloc.c:3476 skb_free_frag include/linux/skbuff.h:3188 [inline] skb_free_head net/core/skbuff.c:758 [inline] skb_release_data+0x58e/0x6d0 net/core/skbuff.c:789 skb_release_all net/core/skbuff.c:854 [inline] __kfree_skb+0x56/0x1d0 net/core/skbuff.c:868 tcp_eat_recv_skb net/ipv4/tcp.c:1637 [inline] tcp_recvmsg_locked+0x14ab/0x25c0 net/ipv4/tcp.c:2632 tcp_recvmsg+0x337/0x870 net/ipv4/tcp.c:2678 inet_recvmsg+0x13a/0x250 net/ipv4/af_inet.c:850 sock_recvmsg_nosec net/socket.c:995 [inline] sock_recvmsg net/socket.c:1013 [inline] sock_read_iter+0x3fa/0x530 net/socket.c:1086 call_read_iter include/linux/fs.h:2184 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x7ac/0xbf0 fs/read_write.c:470 ksys_read+0x177/0x2a0 fs/read_write.c:613 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 Memory state around the buggy address: ffff88807d380c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807d380d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807d380d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807d380e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807d380e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================