================================================================== 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:5795 Write of size 65503 at addr ffff888199bce3a0 by task syz-executor.5/1853 CPU: 0 PID: 1853 Comm: syz-executor.5 Not tainted 4.14.146+ #0 EXT4-fs error (device sda1): ext4_xattr_set_entry:1605: inode #16697: comm syz-executor.4: corrupted xattr entries Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 lib/dump_stack.c:53 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:5795 EXT4-fs error (device sda1): ext4_xattr_set_entry:1605: inode #16523: comm syz-executor.4: corrupted xattr entries ext4_try_to_expand_extra_isize fs/ext4/inode.c:5847 [inline] ext4_mark_inode_dirty+0x471/0x7f0 fs/ext4/inode.c:5923 ext4_unlink+0xb33/0xfd0 fs/ext4/namei.c:3101 vfs_unlink2+0x23c/0x470 fs/namei.c:4157 do_unlinkat+0x327/0x5e0 fs/namei.c:4228 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459777 RSP: 002b:00007fff773209a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000459777 RDX: 00007fff773209c0 RSI: 00007fff773209c0 RDI: 00007fff77320a50 RBP: 00000000000000d1 R08: 0000000000000000 R09: 000000000000000b R10: 0000000000000006 R11: 0000000000000246 R12: 00007fff77321ae0 R13: 00005555561d5940 R14: 0000000000000000 R15: 00007fff77321ae0 The buggy address belongs to the page: page:ffffea000666f380 count:2 mapcount:0 mapping:ffff8881d5698f10 index:0x43b flags: 0x400000000000203a(referenced|dirty|lru|active|private) raw: 400000000000203a ffff8881d5698f10 000000000000043b 00000002ffffffff raw: ffffea0006645ae0 ffffea000667e8e0 ffff8881af26f2a0 ffff8881d641aa80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8881d641aa80 Memory state around the buggy address: ffff888199bcef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888199bcef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888199bcf000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888199bcf080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888199bcf100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================