ntfs3: loop2: Different NTFS' sector size (4096) and media sector size (512) ntfs3: loop2: Mark volume as dirty due to NTFS errors ntfs3: loop2: Failed to load $Extend. ================================================================== 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 ffff888012b1acbd by task syz-executor.2/29860 CPU: 1 PID: 29860 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:0xf7fd9549 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:00000000f7fd45cc EFLAGS: 00000296 ORIG_RAX: 000000000000017f RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000020003c40 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 0000000020003c80 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 29860: 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 Last potentially related work creation: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 call_rcu+0x99/0x790 kernel/rcu/tree.c:2793 mpls_dev_notify+0x617/0x9b0 net/mpls/af_mpls.c:1655 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1945 call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers net/core/dev.c:1997 [inline] unregister_netdevice_many+0xa62/0x1980 net/core/dev.c:10862 sit_exit_batch_net+0x530/0x750 net/ipv6/sit.c:1942 ops_exit_list+0x125/0x170 net/core/net_namespace.c:168 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:595 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Second to last potentially related work creation: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 call_rcu+0x99/0x790 kernel/rcu/tree.c:2793 __percpu_ref_switch_to_atomic lib/percpu-refcount.c:233 [inline] __percpu_ref_switch_mode+0x398/0x920 lib/percpu-refcount.c:280 percpu_ref_kill_and_confirm+0x8a/0x180 lib/percpu-refcount.c:394 percpu_ref_kill include/linux/percpu-refcount.h:149 [inline] kill_ioctx+0x216/0x2f0 fs/aio.c:874 exit_aio+0x1a0/0x340 fs/aio.c:916 __mmput+0x7b/0x4b0 kernel/fork.c:1184 mmput+0x56/0x60 kernel/fork.c:1208 exit_mm kernel/exit.c:510 [inline] do_exit+0x9e2/0x29b0 kernel/exit.c:782 do_group_exit+0xd2/0x2f0 kernel/exit.c:925 get_signal+0x238c/0x2610 kernel/signal.c:2857 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop kernel/entry/common.c:166 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 __do_fast_syscall_32+0x72/0xf0 arch/x86/entry/common.c:181 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 ffff888012b1ac80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 61 bytes inside of 64-byte region [ffff888012b1ac80, ffff888012b1acc0) The buggy address belongs to the physical page: page:ffffea00004ac680 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12b1a flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000900a80 dead000000000002 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 25903, tgid 25902 (syz-executor.3), ts 808378150070, free_ts 644017122677 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_node include/linux/gfp.h:243 [inline] alloc_slab_page mm/slub.c:1826 [inline] allocate_slab+0x80/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] __kmalloc_node+0x2e2/0x380 mm/slub.c:4468 kmalloc_array_node include/linux/slab.h:695 [inline] kcalloc_node include/linux/slab.h:700 [inline] memcg_alloc_slab_cgroups+0x8b/0x140 mm/memcontrol.c:2830 account_slab mm/slab.h:630 [inline] allocate_slab+0x2db/0x3d0 mm/slub.c:1985 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_track_caller+0x30f/0x330 mm/slub.c:4924 kmemdup+0x23/0x50 mm/util.c:129 kmemdup include/linux/fortify-string.h:456 [inline] neigh_sysctl_register+0x9a/0x5e0 net/core/neighbour.c:3793 devinet_sysctl_register+0xb1/0x230 net/ipv4/devinet.c:2623 inetdev_init+0x286/0x580 net/ipv4/devinet.c:279 inetdev_event+0xa85/0x1610 net/ipv4/devinet.c:1534 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] aio_free_ring+0x58b/0x7b0 fs/aio.c:345 free_ioctx+0x1d/0x90 fs/aio.c:615 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff888012b1ab80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888012b1ac00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888012b1ac80: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ^ ffff888012b1ad00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888012b1ad80: fb 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