================================================================== BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x1bbe/0x3b60 fs/ext4/xattr.c:1734 Read of size 4 at addr ffff888193dfeffe by task syz-fuzzer/349 CPU: 1 PID: 349 Comm: syz-fuzzer Not tainted 5.4.50-syzkaller-01107-g93dc81bbbde5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x14a/0x1ce lib/dump_stack.c:118 print_address_description+0x93/0x620 mm/kasan/report.c:374 __kasan_report+0x16d/0x1e0 mm/kasan/report.c:506 kasan_report+0x36/0x60 mm/kasan/common.c:634 check_memory_region_inline mm/kasan/generic.c:181 [inline] check_memory_region+0x2b5/0x2f0 mm/kasan/generic.c:191 memmove+0x25/0x50 mm/kasan/common.c:113 ext4_xattr_set_entry+0x1bbe/0x3b60 fs/ext4/xattr.c:1734 ext4_xattr_ibody_set fs/ext4/xattr.c:2239 [inline] ext4_xattr_set_handle+0xdc3/0x1ed0 fs/ext4/xattr.c:2395 ext4_initxattrs+0xa2/0x100 fs/ext4/xattr_security.c:43 security_inode_init_security+0x27c/0x3c0 security/security.c:996 __ext4_new_inode+0x46ea/0x5cc0 fs/ext4/ialloc.c:1163 ext4_mkdir+0x41e/0x1530 fs/ext4/namei.c:2879 vfs_mkdir2+0x448/0x620 fs/namei.c:3934 do_mkdirat+0x1e7/0x310 fs/namei.c:3963 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4b3cdb Code: ff e9 69 ff ff ff cc cc cc cc cc cc cc cc cc e8 bb a1 f8 ff 48 8b 7c 24 10 48 8b 74 24 18 48 8b 54 24 20 48 8b 44 24 08 0f 05 <48> 3d 01 f0 ff ff 76 20 48 c7 44 24 28 ff ff ff ff 48 c7 44 24 30 RSP: 002b:000000c00318eaf8 EFLAGS: 00000216 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 000000c00002c000 RCX: 00000000004b3cdb RDX: 00000000000001c0 RSI: 000000c00c932080 RDI: ffffffffffffff9c RBP: 000000c00318eb50 R08: 0000000000870a01 R09: 0000000000000001 R10: 000000c00c932080 R11: 0000000000000216 R12: ffffffffffffffff R13: 0000000000000005 R14: 0000000000000004 R15: 0000000000000100 The buggy address belongs to the page: page:ffffea00064f7f80 refcount:2 mapcount:0 mapping:ffff8881d8c1e660 index:0x411 def_blk_aops flags: 0x8000000000002032(referenced|lru|active|private) raw: 8000000000002032 ffffea00062f1bc8 ffffea0006514dc8 ffff8881d8c1e660 raw: 0000000000000411 ffff888198af3a80 00000002ffffffff ffff8881da944000 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8881da944000 Memory state around the buggy address: ffff888193dfef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888193dfef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888193dff000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888193dff080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888193dff100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device sda1): ext4_xattr_set_entry:1603: inode #15890: comm syz-fuzzer: corrupted xattr entries