ntfs: volume version 3.1. ================================================================== BUG: KASAN: use-after-free in ntfs_read_folio+0x9be/0x23e0 fs/ntfs/aops.c:483 Read of size 10 at addr ffff888073d27170 by task syz-executor278/5061 CPU: 0 PID: 5061 Comm: syz-executor278 Not tainted 6.7.0-rc7-syzkaller-00029-g8735c7c84d1b #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:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x142/0x170 mm/kasan/report.c:588 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 ntfs_read_folio+0x9be/0x23e0 fs/ntfs/aops.c:483 read_pages+0x5f0/0x830 mm/readahead.c:180 page_cache_ra_unbounded+0x68e/0x7c0 mm/readahead.c:269 page_cache_sync_readahead include/linux/pagemap.h:1283 [inline] filemap_get_pages+0x49c/0x2080 mm/filemap.c:2497 filemap_read+0x41b/0xec0 mm/filemap.c:2593 __kernel_read+0x425/0x8b0 fs/read_write.c:428 integrity_kernel_read+0xb0/0xf0 security/integrity/iint.c:221 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0xad1/0x1b30 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x554/0xb30 security/integrity/ima/ima_api.c:290 process_measurement+0x1373/0x21c0 security/integrity/ima/ima_main.c:359 ima_file_check+0xf1/0x170 security/integrity/ima/ima_main.c:557 do_open fs/namei.c:3624 [inline] path_openat+0x2897/0x3290 fs/namei.c:3779 do_filp_open+0x234/0x490 fs/namei.c:3809 do_sys_openat2+0x13e/0x1d0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1463 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f68334500e9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 21 18 00 00 90 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:00007ffd74e39588 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f68334500e9 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 00000000ffffff9c RBP: 0000000000000004 R08: 000000000001ee7c R09: 0000000000004800 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd74e395d0 R13: 00007ffd74e39610 R14: 0000000000200000 R15: 0000000000000003 The buggy address belongs to the physical page: page:ffffea0001cf49c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x73d27 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 ffffea0001cf4a08 ffffea0001cf4988 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 0x8(__GFP_MOVABLE), pid 1, tgid 1 (swapper/0), ts 13853939074, free_ts 15522614189 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1537 split_map_pages+0x24a/0x510 mm/compaction.c:97 isolate_freepages_range+0x476/0x4d0 mm/compaction.c:774 alloc_contig_range+0x62e/0x9a0 mm/page_alloc.c:6411 __alloc_contig_pages mm/page_alloc.c:6434 [inline] alloc_contig_pages+0x3f4/0x4f0 mm/page_alloc.c:6514 debug_vm_pgtable_alloc_huge_page+0xb9/0x110 mm/debug_vm_pgtable.c:1095 init_args+0x837/0xb10 mm/debug_vm_pgtable.c:1277 debug_vm_pgtable+0xe0/0x540 mm/debug_vm_pgtable.c:1315 do_one_initcall+0x234/0x810 init/main.c:1236 do_initcall_level+0x157/0x210 init/main.c:1298 do_initcalls+0x3f/0x80 init/main.c:1314 kernel_init_freeable+0x429/0x5c0 init/main.c:1551 kernel_init+0x1d/0x2a0 init/main.c:1441 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x931/0xa60 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 free_contig_range+0x9e/0x160 mm/page_alloc.c:6536 destroy_args+0x8a/0x890 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x4ba/0x540 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x234/0x810 init/main.c:1236 do_initcall_level+0x157/0x210 init/main.c:1298 do_initcalls+0x3f/0x80 init/main.c:1314 kernel_init_freeable+0x429/0x5c0 init/main.c:1551 kernel_init+0x1d/0x2a0 init/main.c:1441 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Memory state around the buggy address: ffff888073d27000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888073d27080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888073d27100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888073d27180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888073d27200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================