================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_set_ea+0x1394/0x1660 fs/ntfs3/xattr.c:411 Write of size 4 at addr ffff88801f07d54c by task syz.1.42/3858 CPU: 0 PID: 3858 Comm: syz.1.42 Not tainted 6.1.102-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 ntfs_set_ea+0x1394/0x1660 fs/ntfs3/xattr.c:411 ntfs_save_wsl_perm+0x139/0x490 fs/ntfs3/xattr.c:976 ntfs3_setattr+0x961/0xb70 fs/ntfs3/file.c:817 notify_change+0xce3/0xfc0 fs/attr.c:499 chown_common+0x5aa/0x900 fs/open.c:736 do_fchownat+0x169/0x240 fs/open.c:767 __do_sys_chown fs/open.c:787 [inline] __se_sys_chown fs/open.c:785 [inline] __x64_sys_chown+0x7e/0x90 fs/open.c:785 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fdcc2f77299 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdcc3c8b048 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007fdcc3106058 RCX: 00007fdcc2f77299 RDX: 000000000000ee01 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007fdcc2fe48e6 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fdcc3106058 R15: 00007fff64f42648 Allocated by task 1: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 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+0x10c/0x2d0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:682 [inline] __kernfs_new_node+0xd4/0x870 fs/kernfs/dir.c:608 kernfs_new_node+0x136/0x230 fs/kernfs/dir.c:684 __kernfs_create_file+0x45/0x2e0 fs/kernfs/file.c:1043 sysfs_add_file_mode_ns+0x246/0x300 fs/sysfs/file.c:294 sysfs_create_file_ns+0x193/0x2a0 fs/sysfs/file.c:355 workqueue_sysfs_register+0x271/0x3c0 kernel/workqueue.c:5768 alloc_workqueue+0x10f2/0x13d0 kernel/workqueue.c:4355 nvme_core_init+0x3e/0x220 drivers/nvme/host/core.c:5487 do_one_initcall+0x265/0x8f0 init/main.c:1298 do_initcall_level+0x157/0x207 init/main.c:1371 do_initcalls+0x49/0x86 init/main.c:1387 kernel_init_freeable+0x45c/0x60f init/main.c:1626 kernel_init+0x19/0x290 init/main.c:1514 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff88801f07d488 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 28 bytes to the right of 168-byte region [ffff88801f07d488, ffff88801f07d530) The buggy address belongs to the physical page: page:ffffea00007c1f40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1f07d flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888012a40c80 raw: 0000000000000000 0000000000110011 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 7069439062, free_ts 7068919991 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2517 prep_new_page mm/page_alloc.c:2524 [inline] get_page_from_freelist+0x322e/0x33b0 mm/page_alloc.c:4283 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5551 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2115 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x1a5/0x2d0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:682 [inline] __kernfs_new_node+0xd4/0x870 fs/kernfs/dir.c:608 kernfs_new_node+0x136/0x230 fs/kernfs/dir.c:684 __kernfs_create_file+0x45/0x2e0 fs/kernfs/file.c:1043 sysfs_add_file_mode_ns+0x246/0x300 fs/sysfs/file.c:294 sysfs_merge_group+0x1f9/0x440 fs/sysfs/group.c:342 dpm_sysfs_add+0xcf/0x270 drivers/base/power/sysfs.c:707 device_add+0x702/0xfd0 drivers/base/core.c:3646 workqueue_sysfs_register+0x1af/0x3c0 kernel/workqueue.c:5757 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1444 [inline] free_pcp_prepare mm/page_alloc.c:1494 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3362 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3457 mm_free_pgd kernel/fork.c:741 [inline] __mmdrop+0xb2/0x470 kernel/fork.c:792 free_bprm+0x135/0x2f0 fs/exec.c:1496 kernel_execve+0x8f1/0xa10 fs/exec.c:2014 call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:113 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88801f07d400: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ffff88801f07d480: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801f07d500: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 ^ ffff88801f07d580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801f07d600: 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 ==================================================================