================================================================== BUG: KASAN: slab-out-of-bounds in hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 Read of size 2 at addr ffff8880232c7820 by task syz-executor.3/9933 CPU: 0 PID: 9933 Comm: syz-executor.3 Not tainted 6.1.0-rc5-syzkaller-00018-g59d0d52c30d4 #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+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x1f0 mm/kasan/report.c:395 kasan_report+0xcd/0x100 mm/kasan/report.c:495 hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 indx_find+0x4ff/0xb20 fs/ntfs3/index.c:1085 dir_search_u+0x161/0x320 fs/ntfs3/dir.c:254 ntfs_lookup+0x112/0x1b0 fs/ntfs3/namei.c:83 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10e6/0x2df0 fs/namei.c:3710 do_filp_open+0x264/0x4f0 fs/namei.c:3740 do_sys_openat2+0x124/0x4e0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_creat fs/open.c:1402 [inline] __se_sys_creat fs/open.c:1396 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1396 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f27f548b639 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f27f626b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f27f55ac120 RCX: 00007f27f548b639 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000640 RBP: 00007f27f54e6ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcf7f18faf R14: 00007f27f626b300 R15: 0000000000022000 Allocated by task 9779: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:325 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] kmem_cache_alloc_node+0x1ca/0x340 mm/slub.c:3443 alloc_task_struct_node kernel/fork.c:171 [inline] dup_task_struct+0x4e/0x490 kernel/fork.c:966 copy_process+0x637/0x4000 kernel/fork.c:2084 kernel_clone+0x21b/0x620 kernel/fork.c:2671 __do_sys_clone kernel/fork.c:2812 [inline] __se_sys_clone kernel/fork.c:2796 [inline] __x64_sys_clone+0x228/0x290 kernel/fork.c:2796 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 9797: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:511 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x94/0x1d0 mm/slub.c:3683 rcu_do_batch kernel/rcu/tree.c:2250 [inline] rcu_core+0x9c1/0x1690 kernel/rcu/tree.c:2510 __do_softirq+0x277/0x738 kernel/softirq.c:571 Last potentially related work creation: kasan_save_stack+0x2b/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:481 call_rcu+0x163/0x9c0 kernel/rcu/tree.c:2798 context_switch kernel/sched/core.c:5194 [inline] __schedule+0x8d1/0xd70 kernel/sched/core.c:6503 preempt_schedule_common+0x93/0xe0 kernel/sched/core.c:6672 preempt_schedule+0xb6/0xc0 kernel/sched/core.c:6696 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irq+0x3c/0x40 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:400 [inline] do_group_exit+0x1ed/0x2b0 kernel/exit.c:947 __do_sys_exit_group kernel/exit.c:961 [inline] __se_sys_exit_group kernel/exit.c:959 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:959 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x2b/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:481 call_rcu+0x163/0x9c0 kernel/rcu/tree.c:2798 context_switch kernel/sched/core.c:5194 [inline] __schedule+0x8d1/0xd70 kernel/sched/core.c:6503 schedule+0xcb/0x190 kernel/sched/core.c:6579 do_nanosleep+0x18c/0x620 kernel/time/hrtimer.c:2044 hrtimer_nanosleep+0x239/0x470 kernel/time/hrtimer.c:2097 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1276 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1254 [inline] __x64_sys_clock_nanosleep+0x344/0x3d0 kernel/time/posix-timers.c:1254 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880232c57c0 which belongs to the cache task_struct of size 7232 The buggy address is located 1056 bytes to the right of 7232-byte region [ffff8880232c57c0, ffff8880232c7400) The buggy address belongs to the physical page: page:ffffea00008cb000 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880232c1d40 pfn:0x232c0 head:ffffea00008cb000 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff88807a22b4c1 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001d21e08 ffffea0000de6e08 ffff8881400073c0 raw: ffff8880232c1d40 0000000000040002 00000001ffffffff ffff88807a22b4c1 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4019, tgid 4019 (syz-executor.2), ts 175446898661, free_ts 175378995744 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4288 __alloc_pages+0x259/0x560 mm/page_alloc.c:5555 alloc_slab_page+0x70/0xf0 mm/slub.c:1794 allocate_slab+0x5e/0x4b0 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x782/0xe20 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] kmem_cache_alloc_node+0x283/0x340 mm/slub.c:3443 alloc_task_struct_node kernel/fork.c:171 [inline] dup_task_struct+0x4e/0x490 kernel/fork.c:966 copy_process+0x637/0x4000 kernel/fork.c:2084 kernel_clone+0x21b/0x620 kernel/fork.c:2671 __do_sys_clone kernel/fork.c:2812 [inline] __se_sys_clone kernel/fork.c:2796 [inline] __x64_sys_clone+0x228/0x290 kernel/fork.c:2796 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd 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+0x80c/0x8f0 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x7d/0x5f0 mm/page_alloc.c:3483 free_slab mm/slub.c:2031 [inline] discard_slab mm/slub.c:2037 [inline] __unfreeze_partials+0x1ab/0x200 mm/slub.c:2586 put_cpu_partial+0x106/0x170 mm/slub.c:2662 qlist_free_all+0x2b/0x70 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x169/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 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/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x1cc/0x300 mm/slub.c:3422 vm_area_dup+0x23/0x1b0 kernel/fork.c:466 __split_vma+0xcc/0x530 mm/mmap.c:2211 do_mas_align_munmap+0x876/0x14e0 mm/mmap.c:2362 do_mas_munmap+0x245/0x2b0 mm/mmap.c:2502 mmap_region+0x7b0/0x1e20 mm/mmap.c:2550 do_mmap+0x8d9/0xf30 mm/mmap.c:1412 vm_mmap_pgoff+0x19e/0x2b0 mm/util.c:520 ksys_mmap_pgoff+0x48c/0x6d0 mm/mmap.c:1458 Memory state around the buggy address: ffff8880232c7700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880232c7780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880232c7800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880232c7880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880232c7900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================