================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:389 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize+0x1ab/0x290 fs/ext4/inode.c:5921 Write of size 1091502048 at addr ffff8880865e12a0 by task syz-executor.3/17059 CPU: 0 PID: 17059 Comm: syz-executor.3 Not tainted 5.3.0-rc6-next-20190830 #75 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.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x134/0x1a0 mm/kasan/generic.c:192 memset+0x24/0x40 mm/kasan/common.c:105 memset include/linux/string.h:389 [inline] __ext4_expand_extra_isize+0x1ab/0x290 fs/ext4/inode.c:5921 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5973 [inline] ext4_mark_inode_dirty+0x74e/0x9b0 fs/ext4/inode.c:6049 ext4_unlink fs/ext4/namei.c:3200 [inline] ext4_unlink+0xd7e/0x10e0 fs/ext4/namei.c:3140 vfs_unlink+0x2d7/0x620 fs/namei.c:3999 do_unlinkat+0x3f7/0x6d0 fs/namei.c:4063 __do_sys_unlink fs/namei.c:4110 [inline] __se_sys_unlink fs/namei.c:4108 [inline] __x64_sys_unlink+0x42/0x50 fs/namei.c:4108 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459637 Code: 00 66 90 b8 58 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 9d ba 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 7d ba fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffeb4ed0cd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000459637 RDX: 00007ffeb4ed0cf0 RSI: 00007ffeb4ed0cf0 RDI: 00007ffeb4ed0d80 RBP: 000000000000025d R08: 0000000000000000 R09: 0000000000000010 R10: 000000000000000a R11: 0000000000000246 R12: 00007ffeb4ed1e10 R13: 000055555623c940 R14: 0000000000000000 R15: 00007ffeb4ed1e10 The buggy address belongs to the page: page:ffffea0002197840 refcount:2 mapcount:0 mapping:ffff888219f2aae0 index:0x43b def_blk_aops flags: 0x1fffc000000203a(referenced|dirty|lru|active|private) raw: 01fffc000000203a ffffea0001e28a48 ffffea0002629c08 ffff888219f2aae0 raw: 000000000000043b ffff888094625dc8 00000002ffffffff ffff888095884000 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888095884000 Memory state around the buggy address: ffff88808660ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808660ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888086610000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888086610080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888086610100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================