================================================================== BUG: KASAN: slab-out-of-bounds in unpacked_ea_size fs/ntfs3/xattr.c:26 [inline] BUG: KASAN: slab-out-of-bounds in unpacked_ea_size fs/ntfs3/xattr.c:23 [inline] BUG: KASAN: slab-out-of-bounds in find_ea fs/ntfs3/xattr.c:54 [inline] BUG: KASAN: slab-out-of-bounds in find_ea fs/ntfs3/xattr.c:44 [inline] BUG: KASAN: slab-out-of-bounds in ntfs_get_ea+0x5ca/0x620 fs/ntfs3/xattr.c:230 Read of size 1 at addr ffff88802152163d by task syz-executor.2/9872 CPU: 2 PID: 9872 Comm: syz-executor.2 Not tainted 6.0.0-rc3-syzkaller-00299-gd895ec7938c4 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 unpacked_ea_size fs/ntfs3/xattr.c:26 [inline] unpacked_ea_size fs/ntfs3/xattr.c:23 [inline] find_ea fs/ntfs3/xattr.c:54 [inline] find_ea fs/ntfs3/xattr.c:44 [inline] ntfs_get_ea+0x5ca/0x620 fs/ntfs3/xattr.c:230 ntfs_get_wsl_perm+0x117/0x360 fs/ntfs3/xattr.c:1067 ntfs_read_mft fs/ntfs3/inode.c:355 [inline] ntfs_iget5+0xe65/0x3280 fs/ntfs3/inode.c:501 dir_search_u+0x36a/0x3f0 fs/ntfs3/dir.c:264 ntfs_lookup+0x174/0x1e0 fs/ntfs3/namei.c:83 __lookup_slow+0x24c/0x460 fs/namei.c:1685 lookup_slow fs/namei.c:1702 [inline] walk_component+0x33f/0x5a0 fs/namei.c:1993 lookup_last fs/namei.c:2450 [inline] path_lookupat+0x1ba/0x840 fs/namei.c:2474 filename_lookup+0x1ce/0x590 fs/namei.c:2503 vfs_statx+0x148/0x390 fs/stat.c:228 do_statx+0xd9/0x160 fs/stat.c:629 __do_sys_statx fs/stat.c:656 [inline] __se_sys_statx fs/stat.c:647 [inline] __ia32_sys_statx+0x156/0x1b0 fs/stat.c:647 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7ff0549 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7feb5cc EFLAGS: 00000296 ORIG_RAX: 000000000000017f RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000020003c40 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020003c80 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 9872: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:525 kmalloc include/linux/slab.h:605 [inline] ntfs_read_ea+0x3e4/0x850 fs/ntfs3/xattr.c:110 ntfs_get_ea+0x1ad/0x620 fs/ntfs3/xattr.c:222 ntfs_get_wsl_perm+0x117/0x360 fs/ntfs3/xattr.c:1067 ntfs_read_mft fs/ntfs3/inode.c:355 [inline] ntfs_iget5+0xe65/0x3280 fs/ntfs3/inode.c:501 dir_search_u+0x36a/0x3f0 fs/ntfs3/dir.c:264 ntfs_lookup+0x174/0x1e0 fs/ntfs3/namei.c:83 __lookup_slow+0x24c/0x460 fs/namei.c:1685 lookup_slow fs/namei.c:1702 [inline] walk_component+0x33f/0x5a0 fs/namei.c:1993 lookup_last fs/namei.c:2450 [inline] path_lookupat+0x1ba/0x840 fs/namei.c:2474 filename_lookup+0x1ce/0x590 fs/namei.c:2503 vfs_statx+0x148/0x390 fs/stat.c:228 do_statx+0xd9/0x160 fs/stat.c:629 __do_sys_statx fs/stat.c:656 [inline] __se_sys_statx fs/stat.c:647 [inline] __ia32_sys_statx+0x156/0x1b0 fs/stat.c:647 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 The buggy address belongs to the object at ffff888021521600 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 61 bytes inside of 64-byte region [ffff888021521600, ffff888021521640) The buggy address belongs to the physical page: page:ffffea0000854840 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21521 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888011842640 raw: 0000000000000000 0000000080200020 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 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 3127, tgid 3127 (udevd), ts 323498176575, free_ts 323429215053 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5515 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:1824 [inline] allocate_slab+0x27e/0x3d0 mm/slub.c:1969 new_slab mm/slub.c:2029 [inline] ___slab_alloc+0x7f1/0xe10 mm/slub.c:3031 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3118 slab_alloc_node mm/slub.c:3209 [inline] slab_alloc mm/slub.c:3251 [inline] __kmalloc+0x32b/0x340 mm/slub.c:4420 kmalloc include/linux/slab.h:605 [inline] kzalloc include/linux/slab.h:733 [inline] tomoyo_encode2.part.0+0xe9/0x3a0 security/tomoyo/realpath.c:45 tomoyo_encode2 security/tomoyo/realpath.c:31 [inline] tomoyo_encode+0x28/0x50 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x186/0x620 security/tomoyo/realpath.c:288 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x272/0x380 security/tomoyo/file.c:771 tomoyo_file_open security/tomoyo/tomoyo.c:320 [inline] tomoyo_file_open+0x9d/0xc0 security/tomoyo/tomoyo.c:315 security_file_open+0x45/0xb0 security/security.c:1646 do_dentry_open+0x349/0x13a0 fs/open.c:865 do_open fs/namei.c:3557 [inline] path_openat+0x1c92/0x28f0 fs/namei.c:3691 do_filp_open+0x1b6/0x400 fs/namei.c:3718 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 __folio_put_small mm/swap.c:105 [inline] __folio_put+0xc1/0x130 mm/swap.c:128 folio_put include/linux/mm.h:1125 [inline] put_page include/linux/mm.h:1177 [inline] free_page_and_swap_cache+0x253/0x2c0 mm/swap_state.c:296 __tlb_remove_table arch/x86/include/asm/tlb.h:34 [inline] __tlb_remove_table_free mm/mmu_gather.c:114 [inline] tlb_remove_table_rcu+0x85/0xe0 mm/mmu_gather.c:169 rcu_do_batch kernel/rcu/tree.c:2245 [inline] rcu_core+0x7b5/0x1890 kernel/rcu/tree.c:2505 __do_softirq+0x1d3/0x9c6 kernel/softirq.c:571 Memory state around the buggy address: ffff888021521500: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888021521580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888021521600: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ^ ffff888021521680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888021521700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 03 74 c0 01 add 0x1(%rax,%rax,8),%esi 4: 10 05 03 74 b8 01 adc %al,0x1b87403(%rip) # 0x1b8740d a: 10 06 adc %al,(%rsi) c: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 10: 10 07 adc %al,(%rdi) 12: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi 16: 10 08 adc %cl,(%rax) 18: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1c: 00 00 add %al,(%rax) 1e: 00 00 add %al,(%rax) 20: 00 51 52 add %dl,0x52(%rcx) 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 retq 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 39: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi