loop1: detected capacity change from 0 to 4096 ntfs3: loop1: Different NTFS' sector size (2048) and media sector size (512) ================================================================== BUG: KASAN: slab-out-of-bounds in hdr_delete_de+0xe0/0x150 fs/ntfs3/index.c:806 Read of size 16842960 at addr ffff888018090600 by task syz-executor.1/29159 CPU: 0 PID: 29159 Comm: syz-executor.1 Not tainted 6.1.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x1f0 mm/kasan/report.c:395 kasan_report+0xcd/0x100 mm/kasan/report.c:495 kasan_check_range+0x2a7/0x2e0 mm/kasan/generic.c:189 memmove+0x25/0x60 mm/kasan/shadow.c:54 hdr_delete_de+0xe0/0x150 fs/ntfs3/index.c:806 indx_delete_entry+0x74f/0x3670 fs/ntfs3/index.c:2193 ni_remove_name+0x27a/0x980 fs/ntfs3/frecord.c:2910 ntfs_unlink_inode+0x3d4/0x720 fs/ntfs3/inode.c:1712 ntfs_rename+0x41a/0xcb0 fs/ntfs3/namei.c:276 vfs_rename+0xd53/0x1130 fs/namei.c:4779 do_renameat2+0xb53/0x1370 fs/namei.c:4930 __do_sys_rename fs/namei.c:4976 [inline] __se_sys_rename fs/namei.c:4974 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:4974 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:0x7f0d8ae8c0d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007f0d8bb58168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f0d8afabf80 RCX: 00007f0d8ae8c0d9 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000020000040 RBP: 00007f0d8aee7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff7ad6117f R14: 00007f0d8bb58300 R15: 0000000000022000 Allocated by task 29159: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xaf/0x1a0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] indx_read+0x29a/0x880 fs/ntfs3/index.c:978 indx_find+0x491/0xb20 fs/ntfs3/index.c:1080 indx_delete_entry+0x460/0x3670 fs/ntfs3/index.c:2167 ni_remove_name+0x27a/0x980 fs/ntfs3/frecord.c:2910 ntfs_unlink_inode+0x3d4/0x720 fs/ntfs3/inode.c:1712 ntfs_rename+0x41a/0xcb0 fs/ntfs3/namei.c:276 vfs_rename+0xd53/0x1130 fs/namei.c:4779 do_renameat2+0xb53/0x1370 fs/namei.c:4930 __do_sys_rename fs/namei.c:4976 [inline] __se_sys_rename fs/namei.c:4974 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:4974 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 ffff888018090000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1536 bytes inside of 4096-byte region [ffff888018090000, ffff888018091000) The buggy address belongs to the physical page: page:ffffea0000602400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x18090 head:ffffea0000602400 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888012842140 raw: 0000000000000000 0000000080040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 29159, tgid 29158 (syz-executor.1), ts 952432403721, free_ts 951752212405 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4291 __alloc_pages+0x259/0x560 mm/page_alloc.c:5558 alloc_slab_page+0xbd/0x190 mm/slub.c:1794 allocate_slab+0x5e/0x4b0 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x782/0xe20 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x252/0x310 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc+0x9e/0x1a0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] indx_read+0x29a/0x880 fs/ntfs3/index.c:978 indx_find+0x491/0xb20 fs/ntfs3/index.c:1080 indx_delete_entry+0x460/0x3670 fs/ntfs3/index.c:2167 ni_remove_name+0x27a/0x980 fs/ntfs3/frecord.c:2910 ntfs_unlink_inode+0x3d4/0x720 fs/ntfs3/inode.c:1712 ntfs_rename+0x41a/0xcb0 fs/ntfs3/namei.c:276 vfs_rename+0xd53/0x1130 fs/namei.c:4779 do_renameat2+0xb53/0x1370 fs/namei.c:4930 __do_sys_rename fs/namei.c:4976 [inline] __se_sys_rename fs/namei.c:4974 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:4974 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x7d/0x5f0 mm/page_alloc.c:3483 free_slab mm/slub.c:2031 [inline] discard_slab mm/slub.c:2037 [inline] __unfreeze_partials+0x1ab/0x200 mm/slub.c:2586 put_cpu_partial+0x106/0x170 mm/slub.c:2662 qlist_free_all+0x2b/0x70 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x169/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc_lru+0x180/0x2e0 mm/slub.c:3429 alloc_inode_sb include/linux/fs.h:3125 [inline] ext4_alloc_inode+0x27/0x570 fs/ext4/super.c:1321 alloc_inode fs/inode.c:259 [inline] new_inode_pseudo+0x61/0x1d0 fs/inode.c:1018 new_inode+0x25/0x1d0 fs/inode.c:1046 __ext4_new_inode+0x26d/0x46f0 fs/ext4/ialloc.c:959 ext4_mkdir+0x41a/0xcf0 fs/ext4/namei.c:2992 vfs_mkdir+0x3b3/0x590 fs/namei.c:4036 do_mkdirat+0x279/0x550 fs/namei.c:4061 __do_sys_mkdirat fs/namei.c:4076 [inline] __se_sys_mkdirat fs/namei.c:4074 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4074 Memory state around the buggy address: ffff888018090f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888018090f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888018091000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888018091080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888018091100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================