================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2894 Read of size 4 at addr ffff8881085a9000 by task syz-executor167/288 CPU: 1 PID: 288 Comm: syz-executor167 Not tainted 5.10.214-syzkaller-00496-ga8e7f812fbc1 #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:0x7fba1ce18dc7 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:00007ffdec9f2128 EFLAGS: 00000207 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fba1ce18dc7 RDX: 0000000000008890 RSI: 0000000000000000 RDI: 00007ffdec9f32d0 RBP: 0000000000000065 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffdec9f32d0 R13: 0000555556cc1740 R14: 431bde82d7b634db R15: 00007ffdec9f5450 Allocated by task 0: (stack is not available) The buggy address belongs to the object at ffff8881085a9000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 0 bytes inside of 128-byte region [ffff8881085a9000, ffff8881085a9080) The buggy address belongs to the page: page:ffffea0004216a40 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8881085a9100 pfn:0x1085a9 flags: 0x4000000000000200(slab) raw: 4000000000000200 ffffea0004216b08 ffffea0004216908 ffff888100043500 raw: ffff8881085a9100 0000000000100005 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, ts 1126045837, free_ts 0 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:5346 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_trace+0x1bd/0x2e0 mm/slub.c:2972 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] call_usermodehelper_setup+0x72/0x1e0 kernel/umh.c:363 kobject_uevent_env+0x637/0x700 lib/kobject_uevent.c:614 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:642 kernel_add_sysfs_param+0x108/0x12d kernel/params.c:798 param_sysfs_builtin+0x16a/0x1e2 kernel/params.c:833 param_sysfs_init+0x6a/0x6f kernel/params.c:954 do_one_initcall+0x189/0x620 init/main.c:1195 do_initcall_level+0x186/0x304 init/main.c:1268 do_initcalls+0x4e/0x8e init/main.c:1284 page_owner free stack trace missing Memory state around the buggy address: ffff8881085a8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881085a8f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881085a9000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881085a9080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881085a9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================