================================================================== 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 3586 at addr ffff8881aad339a0 by task syz-executor.5/12826 CPU: 0 PID: 12826 Comm: syz-executor.5 Not tainted 4.14.151+ #0 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:5832 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5884 [inline] ext4_mark_inode_dirty+0x471/0x7f0 fs/ext4/inode.c:5960 add_dirent_to_buf+0x38e/0x650 fs/ext4/namei.c:2027 ext4_add_entry+0x49e/0x990 fs/ext4/namei.c:2233 ext4_mkdir+0x5b9/0xb50 fs/ext4/namei.c:2791 vfs_mkdir2+0x3c7/0x640 fs/namei.c:3967 SYSC_mkdirat fs/namei.c:3996 [inline] SyS_mkdirat+0x125/0x220 fs/namei.c:3980 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459637 RSP: 002b:00007ffcce57e928 EFLAGS: 00000206 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 0000000000050f8f RCX: 0000000000459637 RDX: 00007ffcce57e974 RSI: 00000000000001ff RDI: 00007ffcce57e970 RBP: 000000000000007b R08: 0000000000000000 R09: 0000000000000004 R10: 0000000000000064 R11: 0000000000000206 R12: 000000000000001b R13: 00007ffcce57e960 R14: 0000000000050c5e R15: 00007ffcce57e970 The buggy address belongs to the page: page:ffffea0006ab4cc0 count:2 mapcount:0 mapping:ffff8881d56b8950 index:0x433 flags: 0x400000000000203a(referenced|dirty|lru|active|private) raw: 400000000000203a ffff8881d56b8950 0000000000000433 00000002ffffffff raw: ffffea0006969460 ffffea00070ee260 ffff8881cb02f9d8 ffff8881d641aa80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8881d641aa80 Memory state around the buggy address: ffff8881aad33f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881aad33f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881aad34000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881aad34080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881aad34100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================