loop2: detected capacity change from 0 to 8226 ntfs3: loop2: Mark volume as dirty due to NTFS errors ntfs3: loop2: Failed to load $Extend. ================================================================== BUG: KASAN: use-after-free in hdr_find_e+0x279/0x5b0 fs/ntfs3/index.c:689 Read of size 2 at addr ffff888074b29820 by task syz-executor.2/4286 CPU: 1 PID: 4286 Comm: syz-executor.2 Not tainted 6.0.0-syzkaller-07994-ge8bc52cb8df8 #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+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x220 mm/kasan/report.c:433 kasan_report+0xfb/0x130 mm/kasan/report.c:495 hdr_find_e+0x279/0x5b0 fs/ntfs3/index.c:689 indx_find+0x4ff/0xb20 fs/ntfs3/index.c:1085 dir_search_u+0x1b2/0x390 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+0x10f8/0x2e00 fs/namei.c:3688 do_filp_open+0x275/0x500 fs/namei.c:3718 do_sys_openat2+0x13b/0x500 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1337 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f430ea8a5a9 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:00007f430fb95168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f430ebabf80 RCX: 00007f430ea8a5a9 RDX: 000000000000275a RSI: 00000000200001c0 RDI: ffffffffffffff9c RBP: 00007f430eae5580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffedaaefbaf R14: 00007f430fb95300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0001d2ca40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x74b29 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 ffffffff00000301 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1528c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 4238, tgid 4221 (syz-executor.1), ts 285526763686, free_ts 285721105559 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 skb_page_frag_refill+0x14c/0x2d0 net/core/sock.c:2843 sk_page_frag_refill+0x47/0xe0 net/core/sock.c:2863 tcp_sendmsg_locked+0xfcc/0x41c0 net/ipv4/tcp.c:1351 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1482 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] __sys_sendto+0x46d/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+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd 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/0x630 mm/page_alloc.c:3476 __skb_frag_unref include/linux/skbuff.h:3383 [inline] skb_release_data+0x37a/0x6d0 net/core/skbuff.c:783 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+0x14b2/0x25f0 net/ipv4/tcp.c:2632 tcp_recvmsg+0x22b/0x8b0 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] __sys_recvfrom+0x352/0x4d0 net/socket.c:2169 __do_sys_recvfrom net/socket.c:2187 [inline] __se_sys_recvfrom net/socket.c:2183 [inline] __x64_sys_recvfrom+0xda/0xf0 net/socket.c:2183 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888074b29700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888074b29780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888074b29800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888074b29880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888074b29900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================