EXT4-fs error (device sda1): ext4_xattr_set_entry:1605: inode #16483: comm syz-executor.3: corrupted xattr entries ================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:332 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize.isra.0+0x10b/0x1c0 fs/ext4/inode.c:5832 Write of size 736 at addr ffff8881b3021fa0 by task syz-fuzzer/1794 CPU: 1 PID: 1794 Comm: syz-fuzzer Not tainted 4.14.154+ #0 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xe5/0x154 lib/dump_stack.c:58 print_address_description+0x60/0x226 mm/kasan/report.c:187 __kasan_report.cold+0x1a/0x41 mm/kasan/report.c:316 memset+0x20/0x40 mm/kasan/common.c:113 memset include/linux/string.h:332 [inline] __ext4_expand_extra_isize.isra.0+0x10b/0x1c0 fs/ext4/inode.c:5832 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5884 [inline] ext4_mark_inode_dirty+0x471/0x7f0 fs/ext4/inode.c:5960 ext4_rmdir fs/ext4/namei.c:3133 [inline] ext4_rmdir+0x8a7/0xbc0 fs/ext4/namei.c:3066 vfs_rmdir2 fs/namei.c:4032 [inline] vfs_rmdir2+0x214/0x410 fs/namei.c:4010 do_rmdir+0x28a/0x340 fs/namei.c:4098 SYSC_unlinkat fs/namei.c:4268 [inline] SyS_unlinkat+0x52/0x70 fs/namei.c:4262 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x47fd44 RSP: 002b:000000c432dc5880 EFLAGS: 00000246 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000047fd44 RDX: 0000000000000200 RSI: 000000c423f35d80 RDI: ffffffffffffff9c RBP: 000000c432dc58e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000018 R14: 0000000000000011 R15: 0000000000000018 The buggy address belongs to the page: page:ffffea0006cc0840 count:2 mapcount:0 mapping:ffff8881da4170d0 index:0x458 flags: 0x400000000000203a(referenced|dirty|lru|active|private) raw: 400000000000203a ffff8881da4170d0 0000000000000458 00000002ffffffff raw: ffffea000703b060 ffffea0006bb9ea0 ffff8881c3af80a8 ffff8881da81aa80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8881da81aa80 Memory state around the buggy address: ffff8881b3021f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881b3021f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881b3022000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881b3022080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881b3022100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================