ntfs3: loop1: Different NTFS sector size (4096) and media sector size (512). ntfs3: loop1: NTFS 0.00 Gb is too big to use 32 bits per cluster. ================================================================== BUG: KASAN: use-after-free in memcmp+0x172/0x1c0 lib/string.c:681 Read of size 8 at addr ffff8880451e1002 by task syz-executor.1/18308 CPU: 0 PID: 18308 Comm: syz-executor.1 Not tainted 6.5.0-rc5-syzkaller-00029-g14f9643dc90a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 memcmp+0x172/0x1c0 lib/string.c:681 memcmp include/linux/fortify-string.h:728 [inline] ntfs_init_from_boot fs/ntfs3/super.c:860 [inline] ntfs_fill_super+0x6e0/0x43b0 fs/ntfs3/super.c:1141 get_tree_bdev+0x43e/0x7d0 fs/super.c:1318 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f2a27c7e1ea 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:00007f2a267fdee8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f2a267fdf80 RCX: 00007f2a27c7e1ea RDX: 0000000020000140 RSI: 0000000020000040 RDI: 00007f2a267fdf40 RBP: 0000000020000140 R08: 00007f2a267fdf80 R09: 0000000000800008 R10: 0000000000800008 R11: 0000000000000202 R12: 0000000020000040 R13: 00007f2a267fdf40 R14: 000000000001f224 R15: 00000000200000c0 The buggy address belongs to the physical page: page:ffffea0001147840 refcount:2 mapcount:0 mapping:ffff88803e796c58 index:0x0 pfn:0x451e1 memcg:ffff88803e832000 aops:ntfs_aops ino:21 dentry name:"bus" flags: 0xfff2800000205e(referenced|uptodate|dirty|lru|workingset|private|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff2800000205e ffffea0002336408 ffffea00021d0088 ffff88803e796c58 raw: 0000000000000000 ffff888086a202f8 00000002ffffffff ffff88803e832000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 18306, tgid 18304 (syz-executor.0), ts 704855584040, free_ts 704854352485 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x10a9/0x31e0 mm/page_alloc.c:3221 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4477 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2292 folio_alloc+0x1e/0x60 mm/mempolicy.c:2302 filemap_alloc_folio+0x3bb/0x490 mm/filemap.c:979 filemap_create_folio mm/filemap.c:2492 [inline] filemap_get_pages+0xcf2/0x1820 mm/filemap.c:2570 filemap_read+0x373/0xd00 mm/filemap.c:2658 generic_file_read_iter+0x346/0x450 mm/filemap.c:2837 ntfs_file_read_iter+0x1b8/0x270 fs/ntfs3/file.c:744 __kernel_read+0x301/0x8a0 fs/read_write.c:428 integrity_kernel_read+0x7f/0xb0 security/integrity/iint.c:195 ima_calc_file_hash_tfm+0x2c5/0x3d0 security/integrity/ima/ima_crypto.c:485 ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0x1c6/0x4a0 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x5e2/0x6f0 security/integrity/ima/ima_api.c:289 process_measurement+0xc87/0x1cc0 security/integrity/ima/ima_main.c:345 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x508/0xb90 mm/page_alloc.c:2348 free_unref_page_list+0xe6/0xb30 mm/page_alloc.c:2489 release_pages+0x32a/0x14e0 mm/swap.c:1042 tlb_batch_pages_flush+0x9a/0x190 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x14b/0x7e0 mm/mmu_gather.c:391 exit_mmap+0x2db/0x960 mm/mmap.c:3215 __mmput+0x12a/0x4d0 kernel/fork.c:1348 mmput+0x62/0x70 kernel/fork.c:1370 exit_mm kernel/exit.c:567 [inline] do_exit+0x9b4/0x2a20 kernel/exit.c:861 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1033 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8880451e0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880451e0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880451e1000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880451e1080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880451e1100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================