memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5020 'syz-executor298' loop0: detected capacity change from 0 to 4096 ntfs3: loop0: Different NTFS sector size (4096) and media sector size (512). ntfs3: loop0: RAW NTFS volume: Filesystem size 16384.00 Gb > volume size 0.00 Gb. Mount in read-only. ntfs3: loop0: NTFS 16384.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 ffff888072324002 by task syz-executor298/5020 CPU: 0 PID: 5020 Comm: syz-executor298 Not tainted 6.5.0-rc6-syzkaller-00200-gd4ddefee5160 #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:0x7f8508171e5a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 8e 04 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc2a1ea908 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffc2a1ea920 RCX: 00007f8508171e5a RDX: 00000000200000c0 RSI: 0000000020000000 RDI: 00007ffc2a1ea920 RBP: 0000000000000004 R08: 00007ffc2a1ea960 R09: 000000000001f1a1 R10: 0000000000800000 R11: 0000000000000286 R12: 0000000000800000 R13: 00007ffc2a1ea960 R14: 0000000000000003 R15: 0000000000200000 The buggy address belongs to the physical page: page:ffffea0001c8c900 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x72324 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 ffffea0001c8c948 ffff8880b9843460 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 10022712808, free_ts 10617431865 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570 split_map_pages+0x1ff/0x520 mm/compaction.c:97 isolate_freepages_range+0x31e/0x380 mm/compaction.c:754 alloc_contig_range+0x32e/0x510 mm/page_alloc.c:6270 __alloc_contig_pages mm/page_alloc.c:6293 [inline] alloc_contig_pages+0x30c/0x600 mm/page_alloc.c:6373 debug_vm_pgtable_alloc_huge_page mm/debug_vm_pgtable.c:1096 [inline] init_args mm/debug_vm_pgtable.c:1279 [inline] debug_vm_pgtable+0x955/0x3ff0 mm/debug_vm_pgtable.c:1317 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5bd/0x8f0 init/main.c:1546 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 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+0x33/0x3b0 mm/page_alloc.c:2443 free_contig_range+0xb6/0x190 mm/page_alloc.c:6395 destroy_args+0x686/0x940 mm/debug_vm_pgtable.c:1029 debug_vm_pgtable+0x2339/0x3ff0 mm/debug_vm_pgtable.c:1410 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5bd/0x8f0 init/main.c:1546 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff888072323f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888072323f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888072324000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888072324080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888072324100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================