================================================================== BUG: KASAN: slab-out-of-bounds in memset include/linux/string.h:344 [inline] BUG: KASAN: slab-out-of-bounds in __ext4_expand_extra_isize+0x1ab/0x290 fs/ext4/inode.c:5941 Write of size 83885958 at addr ffff88808f566efa by task rs:main Q:Reg/9172 CPU: 1 PID: 9172 Comm: rs:main Q:Reg Not tainted 5.2.0-rc7-next-20190703 #28 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+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:614 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:107 memset include/linux/string.h:344 [inline] __ext4_expand_extra_isize+0x1ab/0x290 fs/ext4/inode.c:5941 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5993 [inline] ext4_mark_inode_dirty+0x74e/0x9b0 fs/ext4/inode.c:6069 ext4_dirty_inode+0x8f/0xc0 fs/ext4/inode.c:6103 __mark_inode_dirty+0x68e/0x1390 fs/fs-writeback.c:2167 generic_update_time+0x21c/0x370 fs/inode.c:1664 update_time fs/inode.c:1680 [inline] file_update_time+0x30f/0x4f0 fs/inode.c:1895 __generic_file_write_iter+0x1cf/0x630 mm/filemap.c:3357 ext4_file_write_iter+0x373/0x1430 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1870 [inline] new_sync_write+0x4d3/0x770 fs/read_write.c:483 __vfs_write+0xe1/0x110 fs/read_write.c:496 vfs_write+0x268/0x5d0 fs/read_write.c:558 ksys_write+0x14f/0x290 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f3710cc319d 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:00007f370f264000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000105 RCX: 00007f3710cc319d RDX: 0000000000000105 RSI: 00000000006f5090 RDI: 0000000000000002 RBP: 00000000006f5090 R08: 00000000006f5185 R09: 00007f3710640e77 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 00007f370f264480 R14: 0000000000000002 R15: 00000000006f4e90 The buggy address belongs to the page: page:ffffea00023d5980 refcount:2 mapcount:0 mapping:ffff8880a0847518 index:0x427 def_blk_aops flags: 0x1fffc000000203a(referenced|dirty|lru|active|private) raw: 01fffc000000203a ffffea00021c9548 ffffea0002256f88 ffff8880a0847518 raw: 0000000000000427 ffff888092baaf18 00000002ffffffff ffff8880a983ebc0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880a983ebc0 Memory state around the buggy address: ffff88808f7fff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808f7fff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808f800000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808f800080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808f800100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================