loop0: detected capacity change from 0 to 67541 ntfs3: loop0: Different NTFS' sector size (1024) and media sector size (512) ntfs3: loop0: Mark volume as dirty due to NTFS errors ================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_trim_fs+0x710/0x9e0 fs/ntfs3/bitmap.c:1434 Read of size 2 at addr ffff8880178c907a by task syz-executor244/3606 CPU: 0 PID: 3606 Comm: syz-executor244 Not tainted 6.0.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x1f0 mm/kasan/report.c:433 kasan_report+0xc3/0xf0 mm/kasan/report.c:495 ntfs_trim_fs+0x710/0x9e0 fs/ntfs3/bitmap.c:1434 ntfs_ioctl_fitrim fs/ntfs3/file.c:40 [inline] ntfs_ioctl+0x2d4/0x3a0 fs/ntfs3/file.c:57 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f50474ce189 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff0f5ff7f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5047513818 RCX: 00007f50474ce189 RDX: 0000000020000080 RSI: 00000000c0185879 RDI: 0000000000000003 RBP: 00007f5047513630 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f504748d9c4 R11: 0000000000000246 R12: 00007f50475131c0 R13: 00007f5047511b40 R14: 00030030454c4946 R15: 0000000000000000 Allocated by task 3606: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc+0xcd/0x100 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:234 [inline] __kmalloc+0x226/0x370 mm/slub.c:4429 kmalloc_array include/linux/slab.h:640 [inline] kcalloc include/linux/slab.h:671 [inline] wnd_init+0x1db/0x310 fs/ntfs3/bitmap.c:664 ntfs_fill_super+0x310a/0x42a0 fs/ntfs3/super.c:1118 get_tree_bdev+0x400/0x620 fs/super.c:1323 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x289/0xad0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880178c9078 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 2 bytes inside of 8-byte region [ffff8880178c9078, ffff8880178c9080) The buggy address belongs to the physical page: page:ffffea00005e3240 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880178c9d70 pfn:0x178c9 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000001 ffff888012041280 raw: ffff8880178c9d70 0000000080660064 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, tgid 1 (swapper/0), ts 2168116403, free_ts 0 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2103 alloc_slab_page+0x70/0xf0 mm/slub.c:1829 allocate_slab+0x5e/0x520 mm/slub.c:1974 new_slab mm/slub.c:2034 [inline] ___slab_alloc+0x3ee/0xc40 mm/slub.c:3036 __slab_alloc mm/slub.c:3123 [inline] slab_alloc_node mm/slub.c:3214 [inline] slab_alloc mm/slub.c:3256 [inline] kmem_cache_alloc_trace+0x25f/0x310 mm/slub.c:3287 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:733 [inline] add_sysfs_param+0x552/0x800 kernel/params.c:643 kernel_add_sysfs_param+0xb0/0x126 kernel/params.c:812 param_sysfs_builtin+0x1fb/0x2a5 kernel/params.c:851 param_sysfs_init+0x68/0x6c kernel/params.c:970 do_one_initcall+0x1b9/0x3e0 init/main.c:1296 do_initcall_level+0x168/0x218 init/main.c:1369 do_initcalls+0x4b/0x8c init/main.c:1385 kernel_init_freeable+0x3f1/0x57b init/main.c:1623 kernel_init+0x19/0x2b0 init/main.c:1512 page_owner free stack trace missing Memory state around the buggy address: ffff8880178c8f00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ffff8880178c8f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880178c9000: 00 fc fc fc fc 00 fc fc fc fc 02 fc fc fc fc 02 ^ ffff8880178c9080: fc fc fc fc 00 fc fc fc fc 05 fc fc fc fc fb fc ffff8880178c9100: fc fc fc fa fc fc fc fc fa fc fc fc fc fa fc fc ==================================================================