loop3: detected capacity change from 0 to 4096 ntfs3: loop3: Different NTFS' sector size (1024) and media sector size (512) ntfs3: loop3: Mark volume as dirty due to NTFS errors ntfs3: loop3: Failed to load $Extend. ================================================================== BUG: KASAN: use-after-free in hdr_find_e.isra.0+0x527/0x590 fs/ntfs3/index.c:689 Read of size 2 at addr ffff8880926f002c by task syz-executor.3/14231 CPU: 1 PID: 14231 Comm: syz-executor.3 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #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+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 hdr_find_e.isra.0+0x527/0x590 fs/ntfs3/index.c:689 indx_find+0x4ff/0x980 fs/ntfs3/index.c:1085 dir_search_u+0x232/0x3f0 fs/ntfs3/dir.c:254 ntfs_lookup+0x174/0x1e0 fs/ntfs3/namei.c:83 lookup_open.isra.0+0x76a/0x12a0 fs/namei.c:3391 open_last_lookups fs/namei.c:3481 [inline] path_openat+0x996/0x28f0 fs/namei.c:3688 do_filp_open+0x1b6/0x400 fs/namei.c:3718 do_sys_openat2+0x16d/0x4c0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_open fs/open.c:1334 [inline] __se_sys_open fs/open.c:1330 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1330 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fb96f28b5a9 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:00007fb970472168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007fb96f3abf80 RCX: 00007fb96f28b5a9 RDX: 0000000000000000 RSI: 0000000000024000 RDI: 0000000020000000 RBP: 00007fb96f2e6580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc37c802ef R14: 00007fb970472300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea000249bc00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x926f0 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x100cc0(GFP_USER), pid 6388, tgid 6387 (syz-executor.3), ts 340713214203, free_ts 341040000033 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 __get_free_pages+0x8/0x40 mm/page_alloc.c:5598 kasan_populate_vmalloc_pte mm/kasan/shadow.c:271 [inline] kasan_populate_vmalloc_pte+0x23/0x150 mm/kasan/shadow.c:262 apply_to_pte_range mm/memory.c:2633 [inline] apply_to_pmd_range mm/memory.c:2677 [inline] apply_to_pud_range mm/memory.c:2713 [inline] apply_to_p4d_range mm/memory.c:2749 [inline] __apply_to_page_range+0x686/0x1030 mm/memory.c:2783 alloc_vmap_area+0xacf/0x1d50 mm/vmalloc.c:1625 __get_vm_area_node+0x142/0x3f0 mm/vmalloc.c:2484 __vmalloc_node_range+0x250/0x13a0 mm/vmalloc.c:3156 __bpf_map_area_alloc+0xd5/0x150 kernel/bpf/syscall.c:332 bloom_map_alloc+0x322/0x620 kernel/bpf/bloom_filter.c:145 find_and_alloc_map kernel/bpf/syscall.c:131 [inline] map_create+0x4d3/0x20c0 kernel/bpf/syscall.c:1106 __sys_bpf+0x754/0x4cf0 kernel/bpf/syscall.c:4947 __do_sys_bpf kernel/bpf/syscall.c:5069 [inline] __se_sys_bpf kernel/bpf/syscall.c:5067 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:5067 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/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:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 kasan_depopulate_vmalloc_pte+0x5c/0x70 mm/kasan/shadow.c:372 apply_to_pte_range mm/memory.c:2633 [inline] apply_to_pmd_range mm/memory.c:2677 [inline] apply_to_pud_range mm/memory.c:2713 [inline] apply_to_p4d_range mm/memory.c:2749 [inline] __apply_to_page_range+0x686/0x1030 mm/memory.c:2783 kasan_release_vmalloc+0xa7/0xc0 mm/kasan/shadow.c:486 __purge_vmap_area_lazy+0x885/0x1c50 mm/vmalloc.c:1753 drain_vmap_area_work+0x52/0xe0 mm/vmalloc.c:1782 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff8880926eff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880926eff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880926f0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880926f0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880926f0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================