ntfs: volume version 3.1. ================================================================== BUG: KASAN: use-after-free in sle64_to_cpup fs/ntfs/endian.h:46 [inline] BUG: KASAN: use-after-free in ntfs_lookup_inode_by_name+0xe86/0x2ca0 fs/ntfs/dir.c:292 Read of size 8 at addr ffff888033f40560 by task syz-executor.2/28320 CPU: 1 PID: 28320 Comm: syz-executor.2 Not tainted 6.7.0-syzkaller-11889-g86c4d58a99ab #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0x163/0x540 mm/kasan/report.c:488 kasan_report+0x142/0x170 mm/kasan/report.c:601 sle64_to_cpup fs/ntfs/endian.h:46 [inline] ntfs_lookup_inode_by_name+0xe86/0x2ca0 fs/ntfs/dir.c:292 check_windows_hibernation_status+0xf0/0x4c0 fs/ntfs/super.c:1282 load_system_files+0x35db/0x4840 fs/ntfs/super.c:1997 ntfs_fill_super+0x19b3/0x2bd0 fs/ntfs/super.c:2900 mount_bdev+0x206/0x2d0 fs/super.c:1663 legacy_get_tree+0xef/0x190 fs/fs_context.c:662 vfs_get_tree+0x8c/0x2a0 fs/super.c:1784 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f475527e4aa Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f475608aef8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f475608af80 RCX: 00007f475527e4aa RDX: 000000002001e700 RSI: 000000002001e740 RDI: 00007f475608af40 RBP: 000000002001e700 R08: 00007f475608af80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000000002001e740 R13: 00007f475608af40 R14: 000000000001e6ed R15: 000000002001e780 The buggy address belongs to the physical page: page:ffffea0000cfd000 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x33f40 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffff7f(buddy) raw: 00fff00000000000 ffffea0000c57c08 ffffea0000d39208 0000000000000000 raw: 0000000000000001 0000000000000003 00000000ffffff7f 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 0x100cca(GFP_HIGHUSER_MOVABLE), pid 27492, tgid 27490 (syz-executor.5), ts 1309665401353, free_ts 1312826261595 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0x33ea/0x3570 mm/page_alloc.c:3311 __alloc_pages+0x255/0x680 mm/page_alloc.c:4567 alloc_pages_mpol+0x3de/0x640 mm/mempolicy.c:2133 shmem_alloc_folio mm/shmem.c:1628 [inline] shmem_alloc_and_add_folio+0x24f/0xde0 mm/shmem.c:1668 shmem_get_folio_gfp+0x7c3/0x1ee0 mm/shmem.c:2052 shmem_get_folio mm/shmem.c:2134 [inline] shmem_write_begin+0x170/0x4c0 mm/shmem.c:2717 generic_perform_write+0x31b/0x630 mm/filemap.c:3928 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2893 call_write_iter include/linux/fs.h:2085 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x783/0xaf0 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b page last free pid 5077 tgid 5077 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x959/0xa80 mm/page_alloc.c:2346 free_unref_page_list+0x5a3/0x840 mm/page_alloc.c:2532 release_pages+0x2117/0x2400 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x6b5/0x1da0 mm/shmem.c:1005 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29b/0xa60 mm/shmem.c:1242 evict+0x2a4/0x630 fs/inode.c:665 __dentry_kill+0x1fa/0x600 fs/dcache.c:603 dput+0x19b/0x2b0 fs/dcache.c:845 __fput+0x672/0x890 fs/file_table.c:384 task_work_run+0x24a/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:108 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0x167/0x370 kernel/entry/common.c:212 do_syscall_64+0x102/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff888033f40400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888033f40480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888033f40500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888033f40580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888033f40600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================