ntfs3: loop0: Mark volume as dirty due to NTFS errors ntfs3: loop0: Failed to load $Extend. ================================================================== BUG: KASAN: slab-out-of-bounds in hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 Read of size 2 at addr ffff888039457820 by task syz-executor.0/1369 CPU: 0 PID: 1369 Comm: syz-executor.0 Not tainted 6.1.0-rc2-syzkaller-00105-gb229b6ca5abb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/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_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+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f306188b5a9 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:00007f3062513168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f30619abf80 RCX: 00007f306188b5a9 RDX: 000000000000275a RSI: 0000000020000080 RDI: ffffffffffffff9c RBP: 00007f30618e67b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd68111fef R14: 00007f3062513300 R15: 0000000000022000 Allocated by task 2971: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:325 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] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x1cc/0x300 mm/slub.c:3422 getname_flags+0xb8/0x4e0 fs/namei.c:139 getname fs/namei.c:218 [inline] __do_sys_unlink fs/namei.c:4367 [inline] __se_sys_unlink fs/namei.c:4365 [inline] __x64_sys_unlink+0x38/0x50 fs/namei.c:4365 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 Freed by task 2971: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:511 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x94/0x1d0 mm/slub.c:3683 putname fs/namei.c:271 [inline] do_unlinkat+0x89a/0x940 fs/namei.c:4342 __do_sys_unlink fs/namei.c:4367 [inline] __se_sys_unlink fs/namei.c:4365 [inline] __x64_sys_unlink+0x45/0x50 fs/namei.c:4365 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 ffff888039456600 which belongs to the cache names_cache of size 4096 The buggy address is located 544 bytes to the right of 4096-byte region [ffff888039456600, ffff888039457600) The buggy address belongs to the physical page: page:ffffea0000e51400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x39450 head:ffffea0000e51400 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff8880121d5640 raw: 0000000000000000 0000000000070007 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 2971, tgid 2971 (udevd), ts 701006458097, free_ts 700997409368 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4287 __alloc_pages+0x259/0x560 mm/page_alloc.c:5554 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] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x24c/0x300 mm/slub.c:3422 getname_flags+0xb8/0x4e0 fs/namei.c:139 getname fs/namei.c:218 [inline] __do_sys_unlink fs/namei.c:4367 [inline] __se_sys_unlink fs/namei.c:4365 [inline] __x64_sys_unlink+0x38/0x50 fs/namei.c:4365 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 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1458 [inline] free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1508 free_unref_page_prepare mm/page_alloc.c:3386 [inline] free_unref_page+0x7d/0x5f0 mm/page_alloc.c:3482 page_to_skb+0x661/0xb80 drivers/net/virtio_net.c:554 receive_mergeable+0x353/0x26b0 drivers/net/virtio_net.c:1122 receive_buf+0x15c/0x1c50 drivers/net/virtio_net.c:1261 virtnet_receive drivers/net/virtio_net.c:1556 [inline] virtnet_poll+0x64b/0x1280 drivers/net/virtio_net.c:1674 __napi_poll+0xbe/0x4b0 net/core/dev.c:6498 napi_poll net/core/dev.c:6565 [inline] net_rx_action+0x75c/0x10d0 net/core/dev.c:6676 __do_softirq+0x277/0x738 kernel/softirq.c:571 Memory state around the buggy address: ffff888039457700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888039457780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888039457800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888039457880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888039457900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================