EXT4-fs error (device sda1): __ext4_expand_extra_isize:5951: inode #16466: comm rs:main Q:Reg: bad extra_isize 34 (inode size 256) EXT4-fs error (device sda1): __ext4_expand_extra_isize:5951: inode #16466: comm rs:main Q:Reg: bad extra_isize 34 (inode size 256) ================================================================== BUG: KASAN: use-after-free in memmove include/linux/string.h:363 [inline] BUG: KASAN: use-after-free in ext4_xattr_set_entry+0xb04/0x34f0 fs/ext4/xattr.c:1738 Read of size 4 at addr ffff888076a23ffe by task syz-fuzzer/8132 CPU: 0 PID: 8132 Comm: syz-fuzzer Not tainted 4.19.107-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396 memmove+0x20/0x50 mm/kasan/kasan.c:293 memmove include/linux/string.h:363 [inline] ext4_xattr_set_entry+0xb04/0x34f0 fs/ext4/xattr.c:1738 ext4_xattr_ibody_set+0x81/0x2a0 fs/ext4/xattr.c:2240 ext4_xattr_set_handle+0x5d2/0x1010 fs/ext4/xattr.c:2396 ext4_initxattrs+0xb5/0x120 fs/ext4/xattr_security.c:43 security_inode_init_security security/security.c:498 [inline] security_inode_init_security+0x294/0x370 security/security.c:471 __ext4_new_inode+0x3ded/0x5b00 fs/ext4/ialloc.c:1165 ext4_mkdir+0x396/0xd90 fs/ext4/namei.c:2656 vfs_mkdir+0x419/0x690 fs/namei.c:3819 do_mkdirat+0x21e/0x280 fs/namei.c:3842 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x47c530 Code: 8b 7c 24 10 48 8b 74 24 18 48 8b 54 24 20 49 c7 c2 00 00 00 00 49 c7 c0 00 00 00 00 49 c7 c1 00 00 00 00 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:000000c420147578 EFLAGS: 00000212 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000047c530 RDX: 00000000000001c0 RSI: 000000c435a68080 RDI: ffffffffffffff9c RBP: 000000c4201475d8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: ffffffffffffffff R13: 0000000000000005 R14: 0000000000000004 R15: 0000000000000100 The buggy address belongs to the page: page:ffffea0001da88c0 count:2 mapcount:0 mapping:ffff8880a317db18 index:0x42f flags: 0xfffe0000001074(referenced|dirty|lru|active|private) raw: 00fffe0000001074 ffffea0001d88348 ffffea0001f5fac8 ffff8880a317db18 raw: 000000000000042f ffff88807fa5ae70 00000002ffffffff ffff88804ba8a6c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88804ba8a6c0 Memory state around the buggy address: ffff888076a23f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888076a23f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888076a24000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888076a24080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888076a24100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================