================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:337 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize+0x16c/0x240 fs/ext4/inode.c:5914 Write of size 1280 at addr ffff888066683b80 by task syz-executor.0/7689 CPU: 1 PID: 7689 Comm: syz-executor.0 Not tainted 5.0.0-next-20190306 #4 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x123/0x190 mm/kasan/generic.c:191 memset+0x24/0x40 mm/kasan/common.c:115 memset include/linux/string.h:337 [inline] __ext4_expand_extra_isize+0x16c/0x240 fs/ext4/inode.c:5914 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5966 [inline] ext4_mark_inode_dirty+0x6e9/0x940 fs/ext4/inode.c:6042 ext4_unlink fs/ext4/namei.c:3045 [inline] ext4_unlink+0xd2d/0x1000 fs/ext4/namei.c:2985 vfs_unlink+0x2d8/0x560 fs/namei.c:3998 do_unlinkat+0x3f7/0x6d0 fs/namei.c:4061 __do_sys_unlink fs/namei.c:4108 [inline] __se_sys_unlink fs/namei.c:4106 [inline] __x64_sys_unlink+0x42/0x50 fs/namei.c:4106 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457dc7 Code: 00 66 90 b8 58 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 4d bb fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 2d bb fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc1c854838 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000457dc7 RDX: 00007ffc1c854850 RSI: 00007ffc1c854850 RDI: 00007ffc1c8548e0 RBP: 0000000000000299 R08: 0000000000000000 R09: 0000000000000010 R10: 000000000000000a R11: 0000000000000246 R12: 00007ffc1c855970 R13: 0000000001882940 R14: 0000000000000000 R15: 00007ffc1c855970 The buggy address belongs to the page: page:ffffea000199a0c0 count:2 mapcount:0 mapping:ffff88809dc97518 index:0x457 def_blk_aops flags: 0x1fffc000000203a(referenced|dirty|lru|active|private) raw: 01fffc000000203a ffffea0001dcb088 ffffea0001997d48 ffff88809dc97518 raw: 0000000000000457 ffff888095ea8738 00000002ffffffff ffff888099c92140 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888099c92140 Memory state around the buggy address: ffff888066683f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888066683f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888066684000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888066684080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888066684100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================