================================================================== 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 2015 at addr ffff88806cc0bba0 by task syz-executor.5/20948 CPU: 0 PID: 20948 Comm: syz-executor.5 Not tainted 5.1.0-rc6+ #82 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_ext_truncate+0x92/0x200 fs/ext4/extents.c:4520 ext4_truncate+0xe08/0x1440 fs/ext4/inode.c:4526 ext4_evict_inode+0x9d5/0x18f0 fs/ext4/inode.c:289 evict+0x309/0x680 fs/inode.c:558 iput_final fs/inode.c:1547 [inline] iput+0x530/0x8d0 fs/inode.c:1573 dentry_unlink_inode+0x2dc/0x400 fs/dcache.c:374 __dentry_kill+0x390/0x610 fs/dcache.c:579 dentry_kill+0xd7/0x5e0 fs/dcache.c:698 dput+0x570/0x6a0 fs/dcache.c:859 path_put+0x31/0x70 fs/namei.c:482 free_fs_struct+0x25/0x70 fs/fs_struct.c:90 exit_fs+0xf0/0x130 fs/fs_struct.c:107 do_exit+0x8e0/0x2fa0 kernel/exit.c:872 do_group_exit+0x135/0x370 kernel/exit.c:980 get_signal+0x399/0x1d50 kernel/signal.c:2577 do_signal+0x87/0x1940 arch/x86/kernel/signal.c:816 exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x52d/0x610 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458d99 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe2f2500cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000073bf08 RCX: 0000000000458d99 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000073bf08 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000073bf0c R13: 00007fffee1db5bf R14: 00007fe2f25019c0 R15: 000000000073bf0c The buggy address belongs to the page: page:ffffea0001b302c0 count:2 mapcount:0 mapping:ffff88809f89f518 index:0x484 def_blk_aops flags: 0x1fffc000000203a(referenced|dirty|lru|active|private) raw: 01fffc000000203a ffffea000228fd88 ffffea000230d848 ffff88809f89f518 raw: 0000000000000484 ffff888099197dc8 00000002ffffffff ffff888060f46c80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888060f46c80 Memory state around the buggy address: ffff88806cc0bf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806cc0bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806cc0c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806cc0c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806cc0c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================