================================================================== 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:5924 Write of size 736 at addr ffff888010c9cea0 by task syz-executor.3/18331 CPU: 1 PID: 18331 Comm: syz-executor.3 Not tainted 5.4.0-rc1-next-20191004 #0 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:5924 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5976 [inline] ext4_mark_inode_dirty+0x74e/0x9b0 fs/ext4/inode.c:6052 ext4_evict_inode+0x977/0x14e0 fs/ext4/inode.c:282 evict+0x306/0x680 fs/inode.c:574 iput_final fs/inode.c:1563 [inline] iput+0x55d/0x900 fs/inode.c:1589 dentry_unlink_inode+0x2d9/0x400 fs/dcache.c:374 __dentry_kill+0x38b/0x600 fs/dcache.c:579 dentry_kill fs/dcache.c:698 [inline] dput+0x639/0xe10 fs/dcache.c:859 path_put+0x31/0x70 fs/namei.c:482 free_fs_struct+0x25/0x70 fs/fs_struct.c:91 exit_fs+0xf0/0x130 fs/fs_struct.c:108 do_exit+0x8da/0x2e60 kernel/exit.c:813 do_group_exit+0x135/0x360 kernel/exit.c:921 get_signal+0x47c/0x2500 kernel/signal.c:2734 do_signal+0x87/0x1700 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x286/0x380 arch/x86/entry/common.c:159 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x65f/0x760 arch/x86/entry/common.c:300 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a59 Code: Bad RIP value. RSP: 002b:00007fb28c77ecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000075bfd0 RCX: 0000000000459a59 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075bfd0 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000075bfd4 R13: 00007ffe8c22ecbf R14: 00007fb28c77f9c0 R15: 000000000075bfd4 The buggy address belongs to the page: page:ffffea0000432700 refcount:2 mapcount:0 mapping:ffff888219f05520 index:0x42e def_blk_aops flags: 0x1fffc000000203a(referenced|dirty|lru|active|private) raw: 01fffc000000203a ffffea000055d848 ffffea000202da48 ffff888219f05520 raw: 000000000000042e ffff88803994b2a0 00000002ffffffff ffff888096326000 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888096326000 Memory state around the buggy address: ffff888010c9cf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888010c9cf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888010c9d000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888010c9d080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888010c9d100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================