================================================================== BUG: KASAN: use-after-free in ntfs_attr_find+0xb88/0xce0 fs/ntfs/attrib.c:597 Read of size 2 at addr ffff88800f4da0b2 by task syz-executor.1/4721 CPU: 2 PID: 4721 Comm: syz-executor.1 Not tainted 6.0.0-syzkaller-09413-g4899a36f91a9 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 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 ntfs_attr_find+0xb88/0xce0 fs/ntfs/attrib.c:597 ntfs_attr_lookup+0x1056/0x2070 fs/ntfs/attrib.c:1193 ntfs_read_inode_mount+0x934/0x2580 fs/ntfs/inode.c:2004 ntfs_fill_super+0x1890/0x92d0 fs/ntfs/super.c:2855 mount_bdev+0x34d/0x410 fs/super.c:1400 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __ia32_sys_mount+0x27e/0x300 fs/namespace.c:3568 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7f35549 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7f30410 EFLAGS: 00000296 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00000000f7f30480 RCX: 0000000020000100 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 00000000f7f304c0 RBP: 00000000f7f304c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page:ffffea00003d3680 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0xf4da flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 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 0, migratetype Movable, gfp_mask 0x152c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 3710, tgid 3623 (syz-fuzzer), ts 218317050933, free_ts 218446297753 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages_slowpath.constprop.0+0x34d/0x2300 mm/page_alloc.c:5084 __alloc_pages+0x43d/0x510 mm/page_alloc.c:5562 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 folio_alloc+0x1c/0x70 mm/mempolicy.c:2280 filemap_alloc_folio+0x306/0x3a0 mm/filemap.c:970 page_cache_ra_unbounded+0x1aa/0x5e0 mm/readahead.c:248 do_page_cache_ra mm/readahead.c:300 [inline] page_cache_ra_order+0x6e8/0xa00 mm/readahead.c:560 do_sync_mmap_readahead mm/filemap.c:3035 [inline] filemap_fault+0x1669/0x2640 mm/filemap.c:3127 __do_fault+0x10d/0x610 mm/memory.c:4173 do_read_fault mm/memory.c:4524 [inline] do_fault mm/memory.c:4653 [inline] handle_pte_fault mm/memory.c:4917 [inline] __handle_mm_fault+0x2130/0x39b0 mm/memory.c:5059 handle_mm_fault+0x1c8/0x780 mm/memory.c:5157 do_user_addr_fault+0x475/0x1210 arch/x86/mm/fault.c:1407 handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x94/0x170 arch/x86/mm/fault.c:1554 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 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_list+0x16f/0xb90 mm/page_alloc.c:3522 shrink_page_list+0x2ba9/0x3810 mm/vmscan.c:2040 shrink_inactive_list mm/vmscan.c:2447 [inline] shrink_list mm/vmscan.c:2674 [inline] shrink_lruvec+0xce4/0x2650 mm/vmscan.c:2991 shrink_node_memcgs mm/vmscan.c:3180 [inline] shrink_node+0x85e/0x1e80 mm/vmscan.c:3304 kswapd_shrink_node mm/vmscan.c:4086 [inline] balance_pgdat+0x8ef/0x1580 mm/vmscan.c:4277 kswapd+0x79b/0xf80 mm/vmscan.c:4537 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: ffff88800f4d9f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88800f4da000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88800f4da080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88800f4da100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88800f4da180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ---------------- Code disassembly (best guess): 0: 03 74 c0 01 add 0x1(%rax,%rax,8),%esi 4: 10 05 03 74 b8 01 adc %al,0x1b87403(%rip) # 0x1b8740d a: 10 06 adc %al,(%rsi) c: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 10: 10 07 adc %al,(%rdi) 12: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi 16: 10 08 adc %cl,(%rax) 18: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1c: 00 00 add %al,(%rax) 1e: 00 00 add %al,(%rax) 20: 00 51 52 add %dl,0x52(%rcx) 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 retq 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 39: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi