================================================================== 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 512 at addr ffff888071d57f80 by task syz-executor.1/7512 CPU: 1 PID: 7512 Comm: syz-executor.1 Not tainted 5.0.0-rc8-next-20190301 #1 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:0x457b77 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:00007ffe3d775ae8 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000457b77 RDX: 00007ffe3d775b00 RSI: 00007ffe3d775b00 RDI: 00007ffe3d775b90 RBP: 00000000000018ca R08: 0000000000000000 R09: 0000000000000011 R10: 000000000000000a R11: 0000000000000246 R12: 00007ffe3d776c20 R13: 000000000144d940 R14: 0000000000000000 R15: 0000000000000001 The buggy address belongs to the page: page:ffffea0001c755c0 count:2 mapcount:0 mapping:ffff8880a1142518 index:0x44f def_blk_aops flags: 0x1fffc000000203a(referenced|dirty|lru|active|private) raw: 01fffc000000203a ffffea0001db9b48 ffffea0001adbdc8 ffff8880a1142518 raw: 000000000000044f ffff88808dccad20 00000002ffffffff ffff8880587fa280 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880587fa280 Memory state around the buggy address: ffff888071d57f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071d57f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888071d58000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888071d58080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888071d58100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================