================================================================== BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x3509/0x3810 fs/ext4/xattr.c:1589 Read of size 4 at addr ffff888031dfe004 by task syz-executor635/10091 CPU: 0 PID: 10091 Comm: syz-executor635 Not tainted 5.12.0-rc4-next-20210324-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 ext4_xattr_set_entry+0x3509/0x3810 fs/ext4/xattr.c:1589 ext4_xattr_ibody_set+0x78/0x2b0 fs/ext4/xattr.c:2227 ext4_xattr_set_handle+0x964/0x14f0 fs/ext4/xattr.c:2384 ext4_xattr_set+0x13a/0x340 fs/ext4/xattr.c:2497 __vfs_setxattr+0x115/0x180 fs/xattr.c:180 __vfs_setxattr_noperm+0x125/0x4c0 fs/xattr.c:214 __vfs_setxattr_locked+0x1cf/0x260 fs/xattr.c:274 vfs_setxattr+0x13f/0x330 fs/xattr.c:300 setxattr+0x218/0x2b0 fs/xattr.c:573 path_setxattr+0x197/0x1c0 fs/xattr.c:593 __do_sys_setxattr fs/xattr.c:609 [inline] __se_sys_setxattr fs/xattr.c:605 [inline] __x64_sys_setxattr+0xc0/0x160 fs/xattr.c:605 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4450a9 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 c4 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffcec693ad8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00000000000a0c97 RCX: 00000000004450a9 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000020000100 RBP: 0000000000000000 R08: 0000000000000001 R09: 00007ffcec693b40 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffcec693b0c R13: 00007ffcec693b40 R14: 00007ffcec693b20 R15: 0000000000000467 The buggy address belongs to the page: page:ffffea0000c77f80 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x31dfe flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0000c52448 ffffea0000c35d48 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888031dfdf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888031dfdf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888031dfe000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888031dfe080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888031dfe100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================