EXT4-fs (loop0): mounting ext3 file system using the ext4 subsystem EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. ================================================================== BUG: KASAN: slab-out-of-bounds in ext4_search_dir+0x1e4/0x210 fs/ext4/namei.c:1539 Read of size 1 at addr ffff888027d3d3ed by task syz-executor145/4998 CPU: 0 PID: 4998 Comm: syz-executor145 Not tainted 6.4.0-rc7-syzkaller-00194-g8a28a0b6f1a1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 ext4_search_dir+0x1e4/0x210 fs/ext4/namei.c:1539 ext4_find_inline_entry+0x419/0x4e0 fs/ext4/inline.c:1719 __ext4_find_entry+0x746/0x1050 fs/ext4/namei.c:1612 ext4_lookup_entry fs/ext4/namei.c:1767 [inline] ext4_lookup fs/ext4/namei.c:1835 [inline] ext4_lookup+0x500/0x700 fs/ext4/namei.c:1826 lookup_open.isra.0+0x944/0x1400 fs/namei.c:3470 open_last_lookups fs/namei.c:3560 [inline] path_openat+0x975/0x2750 fs/namei.c:3788 do_filp_open+0x1ba/0x410 fs/namei.c:3818 do_sys_openat2+0x16d/0x4c0 fs/open.c:1356 do_sys_open fs/open.c:1372 [inline] __do_sys_open fs/open.c:1380 [inline] __se_sys_open fs/open.c:1376 [inline] __x64_sys_open+0x11d/0x1c0 fs/open.c:1376 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:0x7f79ed8bccf9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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:00007ffc4b0b2bb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 000000000000963f RCX: 00007f79ed8bccf9 RDX: 0000000000000000 RSI: 0000000000141042 RDI: 0000000020000100 RBP: 0000000000000000 R08: 000000000001f210 R09: 00000000200012c0 R10: 00007f79dd0af000 R11: 0000000000000246 R12: 00007ffc4b0b2bec R13: 00007ffc4b0b2c20 R14: 00007ffc4b0b2c00 R15: 0000000000000001 Allocated by task 4733: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:711 [inline] slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x17c/0x3b0 mm/slub.c:3475 vm_area_alloc+0x20/0x230 kernel/fork.c:489 mmap_region+0x407/0x28d0 mm/mmap.c:2628 do_mmap+0x831/0xf60 mm/mmap.c:1394 vm_mmap_pgoff+0x1a2/0x3b0 mm/util.c:543 vm_mmap+0x96/0xc0 mm/util.c:562 elf_map+0x118/0x320 fs/binfmt_elf.c:395 load_elf_binary+0xd79/0x4f40 fs/binfmt_elf.c:1165 search_binary_handler fs/exec.c:1737 [inline] exec_binprm fs/exec.c:1779 [inline] bprm_execve fs/exec.c:1854 [inline] bprm_execve+0x7fd/0x1980 fs/exec.c:1810 do_execveat_common+0x72c/0x8e0 fs/exec.c:1962 do_execve fs/exec.c:2036 [inline] __do_sys_execve fs/exec.c:2112 [inline] __se_sys_execve fs/exec.c:2107 [inline] __x64_sys_execve+0x93/0xc0 fs/exec.c:2107 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 Freed by task 4733: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3786 [inline] kmem_cache_free+0xe9/0x480 mm/slub.c:3808 remove_vma+0x121/0x170 mm/mmap.c:146 exit_mmap+0x33e/0x930 mm/mmap.c:3130 __mmput+0x128/0x4c0 kernel/fork.c:1351 mmput+0x60/0x70 kernel/fork.c:1373 exit_mm kernel/exit.c:567 [inline] do_exit+0x9b0/0x29b0 kernel/exit.c:861 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1033 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 ffff888027d3d300 which belongs to the cache vm_area_struct of size 192 The buggy address is located 45 bytes to the right of allocated 192-byte region [ffff888027d3d300, ffff888027d3d3c0) The buggy address belongs to the physical page: page:ffffea00009f4f40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27d3d flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888140007b40 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 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 4732, tgid 4732 (rm), ts 20764010397, free_ts 20750708211 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3192 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3291 __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x38e/0x3b0 mm/slub.c:3475 vm_area_dup+0x23/0x300 kernel/fork.c:504 __split_vma+0x199/0x830 mm/mmap.c:2248 split_vma+0xc6/0x110 mm/mmap.c:2318 mprotect_fixup+0x90e/0xbd0 mm/mprotect.c:692 do_mprotect_pkey+0x87f/0xd40 mm/mprotect.c:860 __do_sys_mprotect mm/mprotect.c:881 [inline] __se_sys_mprotect mm/mprotect.c:878 [inline] __x64_sys_mprotect+0x78/0xb0 mm/mprotect.c:878 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 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564 free_unref_page_list+0xe3/0xa70 mm/page_alloc.c:2705 release_pages+0xcd8/0x1380 mm/swap.c:1042 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x14b/0x7e0 mm/mmu_gather.c:391 exit_mmap+0x2b2/0x930 mm/mmap.c:3120 __mmput+0x128/0x4c0 kernel/fork.c:1351 mmput+0x60/0x70 kernel/fork.c:1373 exit_mm kernel/exit.c:567 [inline] do_exit+0x9b0/0x29b0 kernel/exit.c:861 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1033 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: ffff888027d3d280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888027d3d300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888027d3d380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888027d3d400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888027d3d480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================