================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2894 Read of size 4 at addr ffff88811e7be000 by task syz-executor309/288 CPU: 1 PID: 288 Comm: syz-executor309 Not tainted 5.10.215-syzkaller-00370-gb58b8f9dad93 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2894 ext4_evict_inode+0x1095/0x1730 fs/ext4/inode.c:300 evict+0x2a3/0x6c0 fs/inode.c:577 iput_final fs/inode.c:1697 [inline] iput+0x632/0x7e0 fs/inode.c:1723 d_delete_notify include/linux/fsnotify.h:261 [inline] vfs_rmdir+0x271/0x3f0 fs/namei.c:3865 do_rmdir+0x2cf/0x5c0 fs/namei.c:3912 __do_sys_rmdir fs/namei.c:3930 [inline] __se_sys_rmdir fs/namei.c:3928 [inline] __x64_sys_rmdir+0x49/0x50 fs/namei.c:3928 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f317f2cbdc7 Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 54 00 00 00 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:00007ffebdf58688 EFLAGS: 00000207 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f317f2cbdc7 RDX: 0000000000008890 RSI: 0000000000000000 RDI: 00007ffebdf59830 RBP: 0000000000000065 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffebdf59830 R13: 00005555564b6740 R14: 431bde82d7b634db R15: 00007ffebdf5b9b0 Allocated by task 285: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] __kasan_slab_alloc+0xb1/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 vm_area_dup+0x26/0x270 kernel/fork.c:366 dup_mmap kernel/fork.c:550 [inline] dup_mm kernel/fork.c:1435 [inline] copy_mm+0x8ac/0x13a0 kernel/fork.c:1491 copy_process+0x1175/0x3340 kernel/fork.c:2183 kernel_clone+0x21e/0x9e0 kernel/fork.c:2574 __do_sys_clone kernel/fork.c:2700 [inline] __se_sys_clone kernel/fork.c:2684 [inline] __x64_sys_clone+0x23f/0x290 kernel/fork.c:2684 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Freed by task 288: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kmem_cache_free+0xa9/0x1e0 mm/slub.c:3219 vm_area_free+0x52/0xf0 kernel/fork.c:386 __free_vma mm/mmap.c:179 [inline] put_vma mm/mmap.c:186 [inline] remove_vma mm/mmap.c:205 [inline] exit_mmap+0x494/0x5c0 mm/mmap.c:3363 __mmput+0x95/0x2d0 kernel/fork.c:1153 mmput+0x59/0x170 kernel/fork.c:1176 exec_mmap fs/exec.c:1042 [inline] begin_new_exec+0xc70/0x2380 fs/exec.c:1289 load_elf_binary+0x945/0x2750 fs/binfmt_elf.c:998 search_binary_handler fs/exec.c:1722 [inline] exec_binprm fs/exec.c:1763 [inline] bprm_execve+0x81b/0x1600 fs/exec.c:1839 do_execveat_common+0x959/0xac0 fs/exec.c:1950 do_execve fs/exec.c:2020 [inline] __do_sys_execve fs/exec.c:2096 [inline] __se_sys_execve fs/exec.c:2091 [inline] __x64_sys_execve+0x92/0xb0 fs/exec.c:2091 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 The buggy address belongs to the object at ffff88811e7be000 which belongs to the cache vm_area_struct of size 232 The buggy address is located 0 bytes inside of 232-byte region [ffff88811e7be000, ffff88811e7be0e8) The buggy address belongs to the page: page:ffffea000479ef80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11e7be flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff888100190000 raw: 0000000000000000 00000000000d000d 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 285, ts 22822563340, free_ts 17234968858 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:2960 vm_area_dup+0x26/0x270 kernel/fork.c:366 dup_mmap kernel/fork.c:550 [inline] dup_mm kernel/fork.c:1435 [inline] copy_mm+0x8ac/0x13a0 kernel/fork.c:1491 copy_process+0x1175/0x3340 kernel/fork.c:2183 kernel_clone+0x21e/0x9e0 kernel/fork.c:2574 __do_sys_clone kernel/fork.c:2700 [inline] __se_sys_clone kernel/fork.c:2684 [inline] __x64_sys_clone+0x23f/0x290 kernel/fork.c:2684 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page+0x7e/0x1c0 mm/page_alloc.c:3391 __put_single_page mm/swap.c:104 [inline] __put_page+0xb1/0xe0 mm/swap.c:135 put_page include/linux/mm.h:1257 [inline] anon_pipe_buf_release+0x17c/0x210 fs/pipe.c:137 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_read+0x5a6/0x1040 fs/pipe.c:323 call_read_iter include/linux/fs.h:2015 [inline] new_sync_read fs/read_write.c:415 [inline] vfs_read+0x999/0xbb0 fs/read_write.c:496 ksys_read+0x199/0x2c0 fs/read_write.c:634 __do_sys_read fs/read_write.c:644 [inline] __se_sys_read fs/read_write.c:642 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:642 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Memory state around the buggy address: ffff88811e7bdf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811e7bdf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88811e7be000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811e7be080: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ffff88811e7be100: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb ================================================================== EXT4-fs error (device loop0): ext4_xattr_inode_iget:404: comm syz-executor309: inode #1: comm syz-executor309: iget: illegal inode # EXT4-fs error (device loop0): ext4_xattr_inode_iget:409: comm syz-executor309: error while reading EA inode 1 err=-117