================================================================== BUG: KASAN: slab-out-of-bounds in memset include/linux/string.h:337 [inline] BUG: KASAN: slab-out-of-bounds in __ext4_expand_extra_isize+0x16c/0x240 fs/ext4/inode.c:5921 Write of size 646 at addr ffff8880632c5efa by task rs:main Q:Reg/7519 CPU: 1 PID: 7519 Comm: rs:main Q:Reg Not tainted 5.0.0-rc6-next-20190215 #36 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:5921 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5973 [inline] ext4_mark_inode_dirty+0x6e9/0x940 fs/ext4/inode.c:6049 ext4_dirty_inode+0x8f/0xc0 fs/ext4/inode.c:6083 __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] file_update_time+0x311/0x4f0 fs/inode.c:1877 __generic_file_write_iter+0x1cf/0x630 mm/filemap.c:3373 ext4_file_write_iter+0x346/0x11a0 fs/ext4/file.c:266 call_write_iter include/linux/fs.h:1857 [inline] new_sync_write+0x4c7/0x760 fs/read_write.c:474 __vfs_write+0xe4/0x110 fs/read_write.c:487 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0xea/0x1f0 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fe02949f19d Code: d1 20 00 00 75 10 b8 01 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 be fa ff ff 48 89 04 24 b8 01 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 07 fb ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007fe027a40000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000105 RCX: 00007fe02949f19d RDX: 0000000000000105 RSI: 00000000022d9090 RDI: 0000000000000001 RBP: 00000000022d9090 R08: 00000000022d9185 R09: 00000000022eecc0 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 00007fe027a40480 R14: 0000000000000003 R15: 00000000022d8e90 The buggy address belongs to the page: page:ffffea00018cb140 count:2 mapcount:0 mapping:ffff8881c24cca58 index:0x427 def_blk_aops flags: 0x1fffc000000207a(referenced|dirty|lru|active|workingset|private) raw: 01fffc000000207a ffffea0002743c08 ffffea00007ea888 ffff8881c24cca58 raw: 0000000000000427 ffff88802621e540 00000002ffffffff ffff88821a6f0b00 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88821a6f0b00 Memory state around the buggy address: ffff8880632c5f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880632c5f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880632c6000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880632c6080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880632c6100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================