================================================================== 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 30720 at addr ffff888076fc91a0 by task syz-executor.5/7775 CPU: 1 PID: 7775 Comm: syz-executor.5 Not tainted 5.1.0-rc3+ #48 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:0x458007 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:00007ffc79d7e8a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000458007 RDX: 00007ffc79d7e8c0 RSI: 00007ffc79d7e8c0 RDI: 00007ffc79d7e950 RBP: 0000000000002322 R08: 000000000000c802 R09: 0000000000000011 R10: 000000000000000a R11: 0000000000000246 R12: 00007ffc79d7f9e0 R13: 0000000001e4f940 R14: 0000000000000000 R15: 00007ffc79d7f9e0 The buggy address belongs to the page: page:ffffea0001dbf240 count:2 mapcount:0 mapping:ffff88809f904ad8 index:0x42e def_blk_aops flags: 0x1fffc000000203a(referenced|dirty|lru|active|private) raw: 01fffc000000203a ffffea0001dd8088 ffffea0001f6cfc8 ffff88809f904ad8 raw: 000000000000042e ffff888097269930 00000002ffffffff ffff888098b2cd40 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888098b2cd40 Memory state around the buggy address: ffff888076fcff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888076fcff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888076fd0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888076fd0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888076fd0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================