================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:337 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize+0x16f/0x240 fs/ext4/inode.c:5897 Write of size 15733 at addr ffff8801a8de90a0 by task syz-executor3/6106 CPU: 0 PID: 6106 Comm: syz-executor3 Not tainted 4.20.0-rc1-next-20181109+ #110 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memset+0x23/0x40 mm/kasan/kasan.c:285 memset include/linux/string.h:337 [inline] __ext4_expand_extra_isize+0x16f/0x240 fs/ext4/inode.c:5897 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5949 [inline] ext4_mark_inode_dirty+0x816/0xb10 fs/ext4/inode.c:6025 ext4_dirty_inode+0x97/0xc0 fs/ext4/inode.c:6059 __mark_inode_dirty+0x7b9/0x1500 fs/fs-writeback.c:2122 generic_update_time+0x26a/0x450 fs/inode.c:1654 update_time fs/inode.c:1670 [inline] touch_atime+0x29c/0x320 fs/inode.c:1741 file_accessed include/linux/fs.h:2167 [inline] iterate_dir+0x370/0x5d0 fs/readdir.c:56 __do_sys_getdents fs/readdir.c:231 [inline] __se_sys_getdents fs/readdir.c:212 [inline] __x64_sys_getdents+0x29f/0x510 fs/readdir.c:212 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45594b Code: 02 74 b6 31 f6 eb b9 0f 1f 84 00 00 00 00 00 41 57 41 56 48 63 ff 41 55 41 54 b8 4e 00 00 00 55 53 48 89 f3 48 83 ec 08 0f 05 <48> 3d 00 f0 ff ff 77 55 4c 8d 24 06 49 89 c5 4c 39 e6 73 33 90 0f RSP: 002b:00007ffc63440680 EFLAGS: 00000202 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 0000000001a9b970 RCX: 000000000045594b RDX: 0000000000008000 RSI: 0000000001a9b970 RDI: 0000000000000003 RBP: 0000000001a9b970 R08: 0000000000000001 R09: 0000000001a9a940 R10: 0000000000000000 R11: 0000000000000202 R12: ffffffffffffffd4 R13: 0000000000000016 R14: 0000000000000000 R15: 0000000000000003 The buggy address belongs to the page: page:ffffea0006a37a40 count:2 mapcount:0 mapping:ffff8801cc8e0c58 index:0x42e flags: 0x2fffc000000203a(referenced|dirty|lru|active|private) raw: 02fffc000000203a ffffea0006c46a48 ffffea0006a5bdc8 ffff8801cc8e0c58 raw: 000000000000042e ffff8801c1ba19d8 00000002ffffffff ffff8801821604c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8801821604c0 Memory state around the buggy address: ffff8801a8debf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801a8debf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801a8dec000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8801a8dec080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8801a8dec100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================