loop2: detected capacity change from 0 to 4096 ntfs3: loop2: Different NTFS' sector size (1024) and media sector size (512) ================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_list_ea fs/ntfs3/xattr.c:182 [inline] BUG: KASAN: slab-out-of-bounds in ntfs_listxattr+0x402/0x460 fs/ntfs3/xattr.c:710 Read of size 1 at addr ffff88807a3fa2bd by task syz-executor.2/13340 CPU: 1 PID: 13340 Comm: syz-executor.2 Not tainted 6.1.0-rc8-syzkaller-00014-g8ed710da2873 #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+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x461 mm/kasan/report.c:395 kasan_report+0xbf/0x1f0 mm/kasan/report.c:495 ntfs_list_ea fs/ntfs3/xattr.c:182 [inline] ntfs_listxattr+0x402/0x460 fs/ntfs3/xattr.c:710 vfs_listxattr+0x109/0x190 fs/xattr.c:457 listxattr+0xf6/0x180 fs/xattr.c:804 path_listxattr+0xae/0x140 fs/xattr.c:828 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fac4dc8c0d9 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:00007fac4e9b7168 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3 RAX: ffffffffffffffda RBX: 00007fac4ddabf80 RCX: 00007fac4dc8c0d9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200000c0 RBP: 00007fac4dce7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffda66b0c8f R14: 00007fac4e9b7300 R15: 0000000000022000 Allocated by task 13340: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0x5a/0xd0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] ntfs_read_ea+0x3e4/0x850 fs/ntfs3/xattr.c:110 ntfs_list_ea fs/ntfs3/xattr.c:168 [inline] ntfs_listxattr+0x16b/0x460 fs/ntfs3/xattr.c:710 vfs_listxattr+0x109/0x190 fs/xattr.c:457 listxattr+0xf6/0x180 fs/xattr.c:804 path_listxattr+0xae/0x140 fs/xattr.c:828 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88807a3fa280 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 61 bytes inside of 64-byte region [ffff88807a3fa280, ffff88807a3fa2c0) The buggy address belongs to the physical page: page:ffffea0001e8fe80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a3fa flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001f6f948 ffffea0001f19dc8 ffff888012040200 raw: 0000000000000000 ffff88807a3fa000 0000000100000020 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 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 3681, tgid 3681 (syz-executor.4), ts 368667116538, free_ts 368666302390 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4291 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5558 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x94/0x390 mm/slab.c:2570 cache_alloc_refill+0x27f/0x380 mm/slab.c:2943 ____cache_alloc mm/slab.c:3019 [inline] ____cache_alloc mm/slab.c:3002 [inline] __do_cache_alloc mm/slab.c:3202 [inline] slab_alloc_node mm/slab.c:3250 [inline] __kmem_cache_alloc_node+0x44a/0x510 mm/slab.c:3549 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc+0x4a/0xd0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] kzalloc include/linux/slab.h:689 [inline] ext4_htree_store_dirent+0x8d/0x5f0 fs/ext4/dir.c:474 htree_dirblock_to_tree+0x6c7/0xd50 fs/ext4/namei.c:1125 ext4_htree_fill_tree+0x327/0xc40 fs/ext4/namei.c:1204 ext4_dx_readdir fs/ext4/dir.c:597 [inline] ext4_readdir+0x1e23/0x3920 fs/ext4/dir.c:142 iterate_dir+0x56e/0x6f0 fs/readdir.c:65 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __x64_sys_getdents64+0x13e/0x2c0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd 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+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x4d0 mm/page_alloc.c:3483 mm_free_pgd kernel/fork.c:734 [inline] __mmdrop+0xd5/0x400 kernel/fork.c:785 mmdrop include/linux/sched/mm.h:50 [inline] __mmput+0x3fd/0x4c0 kernel/fork.c:1196 mmput+0x60/0x70 kernel/fork.c:1207 exit_mm kernel/exit.c:516 [inline] do_exit+0xa41/0x2a30 kernel/exit.c:807 do_group_exit+0xd4/0x2a0 kernel/exit.c:950 get_signal+0x21b1/0x2440 kernel/signal.c:2858 arch_do_signal_or_restart+0x86/0x2300 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88807a3fa180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88807a3fa200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88807a3fa280: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ^ ffff88807a3fa300: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88807a3fa380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================