================================================================== 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 2715 at addr ffff8881b9c72aa0 by task syz-executor.2/24651 CPU: 0 PID: 24651 Comm: syz-executor.2 Not tainted 4.14.146+ #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:5795 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5847 [inline] ext4_mark_inode_dirty+0x471/0x7f0 fs/ext4/inode.c:5923 ext4_evict_inode+0x6a6/0x1560 fs/ext4/inode.c:282 evict+0x2cb/0x5f0 fs/inode.c:554 iput_final fs/inode.c:1516 [inline] iput fs/inode.c:1543 [inline] iput+0x385/0x7f0 fs/inode.c:1528 dentry_unlink_inode+0x25f/0x320 fs/dcache.c:387 __dentry_kill+0x325/0x560 fs/dcache.c:591 dentry_kill fs/dcache.c:632 [inline] dput.part.0+0x4b5/0x710 fs/dcache.c:847 dput+0x1b/0x30 fs/dcache.c:811 path_put+0x2d/0x60 fs/namei.c:519 free_fs_struct+0x1e/0x60 fs/fs_struct.c:91 exit_fs+0xdc/0x110 fs/fs_struct.c:109 do_exit+0x9a8/0x2a20 kernel/exit.c:871 do_group_exit+0x100/0x2e0 kernel/exit.c:978 get_signal+0x39f/0x1cc0 kernel/signal.c:2422 do_signal+0x96/0x15d0 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x11d/0x160 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x3a3/0x520 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459a29 RSP: 002b:00007f0f9a2dfcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000075bf28 RCX: 0000000000459a29 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075bf28 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000075bf2c R13: 00007ffd21111c5f R14: 00007f0f9a2e09c0 R15: 000000000075bf2c The buggy address belongs to the page: page:ffffea0006e71c80 count:2 mapcount:0 mapping:ffff8881d9ab8950 index:0x498 flags: 0x400000000000203a(referenced|dirty|lru|active|private) raw: 400000000000203a ffff8881d9ab8950 0000000000000498 00000002ffffffff raw: ffffea00067f05e0 ffffea0006d4ffe0 ffff88819d115690 ffff8881da81aa80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8881da81aa80 Memory state around the buggy address: ffff8881b9c72f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881b9c72f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881b9c73000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff f