EXT4-fs error (device sda1): __ext4_expand_extra_isize:5956: inode #15710: comm syz-fuzzer: bad extra_isize 34 (inode size 256) EXT4-fs error (device sda1): __ext4_expand_extra_isize:5956: inode #15975: comm syz-fuzzer: bad extra_isize 34 (inode size 256) ================================================================== BUG: KASAN: use-after-free in memmove include/linux/string.h:388 [inline] BUG: KASAN: use-after-free in ext4_xattr_set_entry+0xbc7/0x3690 fs/ext4/xattr.c:1738 Read of size 4 at addr ffff8881fd11affe by task syz-fuzzer/6459 CPU: 0 PID: 6459 Comm: syz-fuzzer Not tainted 4.19.142-syzkaller #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+0x1fc/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354 kasan_report+0x8f/0x96 mm/kasan/report.c:412 memmove+0x20/0x50 mm/kasan/kasan.c:293 memmove include/linux/string.h:388 [inline] ext4_xattr_set_entry+0xbc7/0x3690 fs/ext4/xattr.c:1738 ext4_xattr_ibody_set+0x81/0x2a0 fs/ext4/xattr.c:2243 ext4_xattr_set_handle+0x5ad/0xfa0 fs/ext4/xattr.c:2399 ext4_initxattrs+0xb5/0x120 fs/ext4/xattr_security.c:43 security_inode_init_security+0x1c4/0x370 security/security.c:498 __ext4_new_inode+0x3e4b/0x5a20 fs/ext4/ialloc.c:1165 ext4_mkdir+0x396/0xdc0 fs/ext4/namei.c:2666 vfs_mkdir+0x508/0x7a0 fs/namei.c:3819 do_mkdirat+0x262/0x2d0 fs/namei.c:3842 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe 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:000000c021848960 EFLAGS: 00000202 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 000000c00002e800 RCX: 00000000004b3cdb RDX: 00000000000001c0 RSI: 000000c00994e540 RDI: ffffffffffffff9c RBP: 000000c0218489b8 R08: 0000000000873c01 R09: 0000000000000001 R10: 000000c00994e540 R11: 0000000000000202 R12: ffffffffffffffff R13: 000000000000002b R14: 000000000000002a R15: 0000000000000100 The buggy address belongs to the page: page:ffffea0007f44680 count:2 mapcount:0 mapping:ffff8880a3188b60 index:0x493 flags: 0x57ffe0000001074(referenced|dirty|lru|active|private) raw: 057ffe0000001074 ffffea0007f5a108 ffffea0007f5ca48 ffff8880a3188b60 raw: 0000000000000493 ffff888082f880a8 00000002ffffffff ffff88821b6dab00 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88821b6dab00 Memory state around the buggy address: ffff8881fd11af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881fd11af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881fd11b000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881fd11b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881fd11b100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================