loop3: detected capacity change from 0 to 4096 ntfs3: loop3: Different NTFS' sector size (1024) and media sector size (512) loop3: detected capacity change from 4096 to 0 ================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_set_ea+0x648/0x13a0 fs/ntfs3/xattr.c:415 Write of size 6 at addr ffff888013e837e4 by task syz.3.15/3036 CPU: 1 PID: 3036 Comm: syz.3.15 Not tainted 6.1.124-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xf4/0x251 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:427 kasan_report+0x136/0x160 mm/kasan/report.c:531 kasan_check_range+0x27f/0x290 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 ntfs_set_ea+0x648/0x13a0 fs/ntfs3/xattr.c:415 ntfs_save_wsl_perm+0x128/0x480 fs/ntfs3/xattr.c:976 ntfs3_setattr+0x295/0x910 fs/ntfs3/file.c:816 notify_change+0x937/0xc40 fs/attr.c:499 chmod_common+0x2b2/0x4d0 fs/open.c:606 do_fchmodat fs/open.c:645 [inline] __do_sys_fchmodat fs/open.c:658 [inline] __se_sys_fchmodat fs/open.c:655 [inline] __x64_sys_fchmodat+0x109/0x180 fs/open.c:655 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0x80 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fad0437e719 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:00007fad051fc038 EFLAGS: 00000246 ORIG_RAX: 000000000000010c RAX: ffffffffffffffda RBX: 00007fad04535f80 RCX: 00007fad0437e719 RDX: 0000000000000141 RSI: 0000000020000200 RDI: ffffffffffffff9c RBP: 00007fad043f175e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fad04535f80 R15: 00007ffe2663fc68 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+0x54/0x3e0 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/0x290 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:689 [inline] __kernfs_new_node+0xd7/0x6b0 fs/kernfs/dir.c:614 kernfs_new_node+0x109/0x1d0 fs/kernfs/dir.c:690 __kernfs_create_file+0x24/0x280 fs/kernfs/file.c:1049 sysfs_add_file_mode_ns fs/sysfs/file.c:294 [inline] sysfs_create_file_ns+0x35f/0x4c0 fs/sysfs/file.c:355 bus_add_driver+0x320/0x4f0 drivers/base/bus.c:626 driver_register+0x1f9/0x330 drivers/base/driver.c:246 do_one_initcall+0x19f/0x4c0 init/main.c:1298 do_initcall_level+0x11e/0x1cd init/main.c:1371 do_initcalls+0x46/0x74 init/main.c:1387 kernel_init_freeable+0x375/0x4e4 init/main.c:1626 kernel_init+0x14/0x190 init/main.c:1514 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888013e83740 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 164 bytes inside of 168-byte region [ffff888013e83740, ffff888013e837e8) The buggy address belongs to the physical page: page:ffffea00004fa0c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13e83 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00003f9340 dead000000000004 ffff888140009b40 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 3394479423, free_ts 3309036217 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x286/0x2b0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x340b/0x35b0 mm/page_alloc.c:4328 __alloc_pages+0x251/0x640 mm/page_alloc.c:5605 alloc_page_interleave+0xf/0x120 mm/mempolicy.c:2115 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x70/0x250 mm/slub.c:1992 ___slab_alloc+0x9df/0xe70 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+0x18b/0x290 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:689 [inline] __kernfs_new_node+0xd7/0x6b0 fs/kernfs/dir.c:614 kernfs_new_node+0x109/0x1d0 fs/kernfs/dir.c:690 __kernfs_create_file+0x24/0x280 fs/kernfs/file.c:1049 sysfs_add_file_mode_ns+0x1c2/0x230 fs/sysfs/file.c:294 sysfs_merge_group+0x1e3/0x3f0 fs/sysfs/group.c:342 dpm_sysfs_add+0x86/0x1b0 drivers/base/power/sysfs.c:707 device_add+0x675/0xd90 drivers/base/core.c:3653 device_create_groups_vargs drivers/base/core.c:4390 [inline] device_create_with_groups+0x230/0x2b0 drivers/base/core.c:4476 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 mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x10b7/0x13b0 mm/page_alloc.c:3384 free_unref_page+0x33/0x390 mm/page_alloc.c:3479 __vunmap+0x397/0x760 mm/vmalloc.c:2718 free_work+0x3d/0x70 mm/vmalloc.c:97 process_one_work+0x745/0xe90 kernel/workqueue.c:2292 worker_thread+0x806/0xe60 kernel/workqueue.c:2439 kthread+0x1e8/0x240 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff888013e83680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888013e83700: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 >ffff888013e83780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ^ ffff888013e83800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ffff888013e83880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ==================================================================