EXT4-fs error (device sda1): ext4_xattr_set_entry:1602: inode #16543: comm syz-executor3: corrupted xattr entries BUG: KASAN: use-after-free in memset include/linux/string.h:329 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize.isra.13+0x108/0x1b0 fs/ext4/inode.c:5780 Write of size 32736 at addr ffff8801961cb0a0 by task syz-executor5/1840 CPU: 0 PID: 1840 Comm: syz-executor5 Not tainted 4.14.78+ #28 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_address_description+0x60/0x22b mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409 memset+0x1f/0x40 mm/kasan/kasan.c:285 memset include/linux/string.h:329 [inline] __ext4_expand_extra_isize.isra.13+0x108/0x1b0 fs/ext4/inode.c:5780 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5832 [inline] ext4_mark_inode_dirty+0x46c/0x7e0 fs/ext4/inode.c:5908 vfs_unlink2+0x23b/0x470 fs/namei.c:4026 do_unlinkat+0x467/0x650 fs/namei.c:4097 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4572b7 RSP: 002b:00007ffd32f71098 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004572b7 RDX: 00007ffd32f710b0 RSI: 00007ffd32f710b0 RDI: 00007ffd32f71140 RBP: 000000000000036c R08: 0000000000000000 R09: 000000000000000b R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffd32f721d0 R13: 000000000209f940 R14: 0000000000000000 R15: 0000000000000005 The buggy address belongs to the page: page:ffffea00065872c0 count:2 mapcount:0 mapping:ffff8801d9aa8950 index:0x445 flags: 0x4000000000001074(referenced|dirty|lru|active|private) raw: 4000000000001074 ffff8801d9aa8950 0000000000000445 00000002ffffffff raw: ffffea0006540f60 ffffea000648dfa0 ffff8801989a7540 ffff8801da81aa80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8801da81aa80 Memory state around the buggy address: ffff8801961cbf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801961cbf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801961cc000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8801961cc080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8801961cc100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================