EXT4-fs error (device sda1): ext4_xattr_set_entry:1607: inode #17503: comm syz-fuzzer: corrupted xattr entries EXT4-fs error (device sda1): ext4_xattr_set_entry:1607: inode #17503: comm syz-fuzzer: corrupted xattr entries EXT4-fs error (device sda1): ext4_xattr_set_entry:1607: inode #17503: comm syz-fuzzer: corrupted xattr entries ================================================================== BUG: KASAN: use-after-free in memmove include/linux/string.h:363 [inline] BUG: KASAN: use-after-free in ext4_xattr_set_entry+0xbf7/0x3770 fs/ext4/xattr.c:1738 Read of size 4 at addr ffff88804a865ffe by task syz-fuzzer/7590 CPU: 1 PID: 7590 Comm: syz-fuzzer Not tainted 4.19.80 #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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d 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+0x8c/0x2ba mm/kasan/report.c:396 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x123/0x190 mm/kasan/kasan.c:267 memmove+0x24/0x50 mm/kasan/kasan.c:293 memmove include/linux/string.h:363 [inline] ext4_xattr_set_entry+0xbf7/0x3770 fs/ext4/xattr.c:1738 ext4_xattr_ibody_set+0x89/0x2c0 fs/ext4/xattr.c:2240 ext4_xattr_set_handle+0x5d2/0x1010 fs/ext4/xattr.c:2396 ext4_initxattrs+0xc0/0x130 fs/ext4/xattr_security.c:43 security_inode_init_security security/security.c:502 [inline] security_inode_init_security+0x2c8/0x3b0 security/security.c:475 ext4_init_security+0x34/0x40 fs/ext4/xattr_security.c:57 __ext4_new_inode+0x3b2a/0x52c0 fs/ext4/ialloc.c:1160 ext4_mkdir+0x3d5/0xdf0 fs/ext4/namei.c:2648 vfs_mkdir+0x42e/0x690 fs/namei.c:3816 do_mkdirat+0x234/0x2a0 fs/namei.c:3839 __do_sys_mkdirat fs/namei.c:3850 [inline] __se_sys_mkdirat fs/namei.c:3848 [inline] __x64_sys_mkdirat+0x76/0xb0 fs/namei.c:3848 do_syscall_64+0xfd/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:000000c433634e00 EFLAGS: 00000202 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000047c530 RDX: 00000000000001c0 RSI: 000000c4240dc960 RDI: ffffffffffffff9c RBP: 000000c433634e60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: ffffffffffffffff R13: 000000000000004c R14: 000000000000004b R15: 0000000000000100 The buggy address belongs to the page: page:ffffea00012a1940 count:2 mapcount:0 mapping:ffff888219956b18 index:0x467 flags: 0x1fffc0000001074(referenced|dirty|lru|active|private) raw: 01fffc0000001074 ffffea00012a4748 ffffea00012a4ac8 ffff888219956b18 raw: 0000000000000467 ffff88809726e498 00000002ffffffff ffff888099192b40 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888099192b40 Memory state around the buggy address: ffff88804a865f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804a865f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804a866000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804a866080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804a866100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================