================================================================== BUG: KASAN: slab-out-of-bounds in memset include/linux/string.h:340 [inline] BUG: KASAN: slab-out-of-bounds in __ext4_expand_extra_isize+0x16c/0x240 fs/ext4/inode.c:5914 Write of size 1347090733 at addr ffff88808ae862a0 by task rs:main Q:Reg/7927 CPU: 1 PID: 7927 Comm: rs:main Q:Reg Not tainted 5.1.0-rc5+ #71 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_dirty_inode+0x8f/0xc0 fs/ext4/inode.c:6076 __mark_inode_dirty+0x919/0x1290 fs/fs-writeback.c:2155 mark_inode_dirty include/linux/fs.h:2128 [inline] __generic_write_end+0x1b9/0x240 fs/buffer.c:2118 generic_write_end+0x6c/0x90 fs/buffer.c:2163 ext4_da_write_end+0x3c8/0xa50 fs/ext4/inode.c:3197 generic_perform_write+0x2f0/0x530 mm/filemap.c:3310 __generic_file_write_iter+0x25e/0x630 mm/filemap.c:3428 ext4_file_write_iter+0x346/0x11c0 fs/ext4/file.c:266 call_write_iter include/linux/fs.h:1866 [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+0x14f/0x2d0 fs/read_write.c:599 __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:608 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fefa5d7319d 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:00007fefa4314000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000000001a1 RCX: 00007fefa5d7319d RDX: 00000000000001a1 RSI: 0000000001181a90 RDI: 0000000000000001 RBP: 0000000001181a90 R08: 0000000001181b95 R09: 00007fefa56f0887 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 00007fefa4314480 R14: 0000000000000003 R15: 0000000001181890 The buggy address belongs to the page: page:ffffea00022ba180 count:2 mapcount:0 mapping:ffff88809f0b3ad8 index:0x427 def_blk_aops flags: 0x1fffc000000203a(referenced|dirty|lru|active|private) raw: 01fffc000000203a ffffea0002468948 ffffea000218b848 ffff88809f0b3ad8 raw: 0000000000000427 ffff88809f1687e0 00000002ffffffff ffff8880aa204bc0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880aa204bc0 Memory state around the buggy address: ffff88808affff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808affff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808b000000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808b000080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808b000100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================