================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:340 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize+0x16c/0x240 fs/ext4/inode.c:5914 Write of size 32735 at addr ffff888081d38aa0 by task syz-executor.1/7562 CPU: 0 PID: 7562 Comm: syz-executor.1 Not tainted 5.1.0-rc4+ #64 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:340 [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:0x458977 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:00007ffd8159fbc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000458977 RDX: 00007ffd8159fbe0 RSI: 00007ffd8159fbe0 RDI: 00007ffd8159fc70 RBP: 0000000000000910 R08: 0000000000000000 R09: 0000000000000010 R10: 000000000000000a R11: 0000000000000246 R12: 00007ffd815a0d00 R13: 0000000001c10940 R14: 0000000000000000 R15: 00007ffd815a0d00 The buggy address belongs to the page: page:ffffea0002074e00 count:2 mapcount:0 mapping:ffff88809f4fe558 index:0x4a3 def_blk_aops flags: 0x1fffc000000203a(referenced|dirty|lru|active|private) raw: 01fffc000000203a ffffea00020f3e08 ffffea0001f832c8 ffff88809f4fe558 raw: 00000000000004a3 ffff8880955fd000 00000002ffffffff ffff888060c743c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888060c743c0 Memory state around the buggy address: ffff888081d39f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888081d39f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888081d3a000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888081d3a080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888081d3a100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================