================================================================== 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 ffff88807ce7fabd by task syz-executor148/3634 CPU: 1 PID: 3634 Comm: syz-executor148 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:0x7fa4db1eb749 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffa7d68008 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3 RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007fa4db1eb749 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200000c0 RBP: 00007fa4db1aafe0 R08: 000000000001f6fe R09: 0000000000000000 R10: 00007fffa7d67ed0 R11: 0000000000000246 R12: 00007fa4db1ab070 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3634: 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 ffff88807ce7fa80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 61 bytes inside of 64-byte region [ffff88807ce7fa80, ffff88807ce7fac0) The buggy address belongs to the physical page: page:ffffea0001f39fc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807ce7f180 pfn:0x7ce7f flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001e69a08 ffffea0000895088 ffff888012040200 raw: ffff88807ce7f180 ffff88807ce7f000 0000000100000016 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 0x242040(__GFP_IO|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 3009, tgid 3009 (udevd), ts 32348431009, free_ts 32117580289 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] tomoyo_encode2.part.0+0xe9/0x3a0 security/tomoyo/realpath.c:45 tomoyo_encode2 security/tomoyo/realpath.c:31 [inline] tomoyo_encode+0x2c/0x50 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x185/0x600 security/tomoyo/realpath.c:283 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x27a/0x380 security/tomoyo/file.c:771 tomoyo_file_open security/tomoyo/tomoyo.c:320 [inline] tomoyo_file_open+0xa1/0xc0 security/tomoyo/tomoyo.c:315 security_file_open+0x49/0xb0 security/security.c:1648 do_dentry_open+0x575/0x13f0 fs/open.c:869 do_open fs/namei.c:3557 [inline] path_openat+0x1bf6/0x2860 fs/namei.c:3714 do_filp_open+0x1ba/0x410 fs/namei.c:3741 do_sys_openat2+0x16d/0x4c0 fs/open.c:1310 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 slab_destroy mm/slab.c:1615 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1635 cache_flusharray mm/slab.c:3360 [inline] ___cache_free+0x2ac/0x3d0 mm/slab.c:3423 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x184/0x210 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 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/slab.c:3257 [inline] slab_alloc mm/slab.c:3265 [inline] __kmem_cache_alloc_lru mm/slab.c:3442 [inline] kmem_cache_alloc+0x220/0x460 mm/slab.c:3461 getname_flags.part.0+0x50/0x4f0 fs/namei.c:139 getname_flags+0x9e/0xe0 include/linux/audit.h:320 vfs_fstatat+0x77/0xb0 fs/stat.c:266 __do_sys_newfstatat+0x94/0x120 fs/stat.c:437 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 Memory state around the buggy address: ffff88807ce7f980: 00 00 00 00 00 00 00 03 fc fc fc fc fc fc fc fc ffff88807ce7fa00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88807ce7fa80: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ^ ffff88807ce7fb00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88807ce7fb80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================