================================================================== 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 ffff888057d90080 by task syz-executor.2/7451 CPU: 1 PID: 7451 Comm: syz-executor.2 Not tainted 5.0.0-rc7-next-20190222 #41 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_dirty_inode+0x8f/0xc0 fs/ext4/inode.c:6076 __mark_inode_dirty+0x919/0x1290 fs/fs-writeback.c:2155 generic_update_time+0x21c/0x370 fs/inode.c:1651 update_time fs/inode.c:1667 [inline] touch_atime+0x23e/0x2a0 fs/inode.c:1738 get_link fs/namei.c:1055 [inline] trailing_symlink+0x2d4/0x970 fs/namei.c:2261 path_mountpoint+0x868/0x1e60 fs/namei.c:2694 filename_mountpoint+0x190/0x3c0 fs/namei.c:2715 user_path_mountpoint_at+0x3a/0x50 fs/namei.c:2745 ksys_umount+0x167/0xf00 fs/namespace.c:1687 __do_sys_umount fs/namespace.c:1713 [inline] __se_sys_umount fs/namespace.c:1711 [inline] __x64_sys_umount+0x54/0x80 fs/namespace.c:1711 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a877 Code: 44 00 00 b8 08 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 4d 8e fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 2d 8e fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fff9bddc9e8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045a877 RDX: 0000000000402e60 RSI: 0000000000000002 RDI: 00007fff9bddca90 RBP: 000000000000073f R08: 0000000000000000 R09: 0000000000000010 R10: 000000000000000a R11: 0000000000000206 R12: 00007fff9bdddb20 R13: 0000000002957940 R14: 0000000000000000 R15: 0000000000000002 The buggy address belongs to the page: page:ffffea00015f6400 count:0 mapcount:-128 mapping:0000000000000000 index:0x1 flags: 0x1fffc0000000000() raw: 01fffc0000000000 ffffea0001387e08 ffffea00015f6f08 0000000000000000 raw: 0000000000000001 0000000000000002 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888057d8ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888057d90000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888057d90080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888057d90100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888057d90180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================