loop2: detected capacity change from 0 to 4096 ntfs3: loop2: Different NTFS sector size (4096) and media sector size (512). ================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_iget5+0x160/0x3b50 fs/ntfs3/inode.c:531 Read of size 8 at addr ffff888039efff60 by task syz-executor.2/11220 CPU: 1 PID: 11220 Comm: syz-executor.2 Not tainted 6.5.0-rc7-syzkaller-00022-ga5e505a99ca7 #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+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+0x175/0x1b0 mm/kasan/report.c:588 ntfs_iget5+0x160/0x3b50 fs/ntfs3/inode.c:531 ntfs_fill_super+0x2cb7/0x4cb0 fs/ntfs3/super.c:1215 get_tree_bdev+0x468/0x6c0 fs/super.c:1318 vfs_get_tree+0x8c/0x270 fs/super.c:1519 do_new_mount+0x28f/0xae0 fs/namespace.c:3335 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1f3b87e1ea 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:00007f1f3c628ee8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f1f3c628f80 RCX: 00007f1f3b87e1ea RDX: 0000000020000000 RSI: 000000002001f1c0 RDI: 00007f1f3c628f40 RBP: 0000000020000000 R08: 00007f1f3c628f80 R09: 0000000000000010 R10: 0000000000000010 R11: 0000000000000202 R12: 000000002001f1c0 R13: 00007f1f3c628f40 R14: 000000000001f1aa R15: 0000000020000140 Allocated by task 5704: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x6c/0x3b0 mm/slab.h:762 slab_alloc_node mm/slub.c:3470 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x123/0x300 mm/slub.c:3494 kmem_cache_zalloc include/linux/slab.h:693 [inline] alloc_buffer_head+0x2d/0x2a0 fs/buffer.c:3037 folio_alloc_buffers+0x3ab/0x9e0 fs/buffer.c:940 folio_create_empty_buffers+0x3a/0x750 fs/buffer.c:1669 ntfs_prepare_pages_for_non_resident_write fs/ntfs/file.c:613 [inline] ntfs_perform_write+0x8ce/0x7520 fs/ntfs/file.c:1844 ntfs_file_write_iter+0x107c/0x1970 fs/ntfs/file.c:1916 call_write_iter include/linux/fs.h:1877 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888039effe80 which belongs to the cache buffer_head of size 168 The buggy address is located 56 bytes to the right of allocated 168-byte region [ffff888039effe80, ffff888039efff28) The buggy address belongs to the physical page: page:ffffea0000e7bfc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x39eff memcg:ffff88807a5cbb01 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888015a66dc0 ffffea0000f9ce80 dead000000000006 raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88807a5cbb01 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 5709, tgid 5708 (syz-executor.0), ts 221085979639, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x31e8/0x3370 mm/page_alloc.c:3221 __alloc_pages+0x255/0x670 mm/page_alloc.c:4477 alloc_slab_page+0x6a/0x160 mm/slub.c:1862 allocate_slab mm/slub.c:2009 [inline] new_slab+0x84/0x2f0 mm/slub.c:2062 ___slab_alloc+0xade/0x1100 mm/slub.c:3215 __slab_alloc mm/slub.c:3314 [inline] __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x1bf/0x300 mm/slub.c:3494 kmem_cache_zalloc include/linux/slab.h:693 [inline] alloc_buffer_head+0x2d/0x2a0 fs/buffer.c:3037 folio_alloc_buffers+0x3ab/0x9e0 fs/buffer.c:940 folio_create_empty_buffers+0x3a/0x750 fs/buffer.c:1669 ext4_block_write_begin+0x27c/0x1570 fs/ext4/inode.c:1024 ext4_da_write_begin+0x5e4/0xa40 fs/ext4/inode.c:2892 generic_perform_write+0x31b/0x630 mm/filemap.c:3923 ext4_buffered_write_iter+0xc6/0x350 fs/ext4/file.c:299 ext4_file_write_iter+0x1df/0x1b10 call_write_iter include/linux/fs.h:1877 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 page_owner free stack trace missing Memory state around the buggy address: ffff888039effe00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888039effe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888039efff00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ^ ffff888039efff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888039f00000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================