================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:333 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize+0x175/0x250 fs/ext4/inode.c:5916 Write of size 57495 at addr ffff888088b159a0 by task syz-executor.2/8250 CPU: 1 PID: 8250 Comm: syz-executor.2 Not tainted 4.19.82 #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.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x123/0x190 mm/kasan/kasan.c:267 memset+0x24/0x40 mm/kasan/kasan.c:285 memset include/linux/string.h:333 [inline] __ext4_expand_extra_isize+0x175/0x250 fs/ext4/inode.c:5916 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5968 [inline] ext4_mark_inode_dirty+0x6f0/0x940 fs/ext4/inode.c:6044 ext4_evict_inode+0x9d2/0x1890 fs/ext4/inode.c:282 evict+0x306/0x680 fs/inode.c:558 iput_final fs/inode.c:1547 [inline] iput fs/inode.c:1573 [inline] iput+0x4fe/0x880 fs/inode.c:1559 dentry_unlink_inode+0x28f/0x350 fs/dcache.c:374 __dentry_kill+0x38b/0x600 fs/dcache.c:566 dentry_kill+0xd3/0x570 fs/dcache.c:685 dput+0x58a/0x670 fs/dcache.c:846 path_put+0x31/0x70 fs/namei.c:484 free_fs_struct+0x25/0x70 fs/fs_struct.c:90 exit_fs+0xf0/0x130 fs/fs_struct.c:107 do_exit+0x963/0x2fa0 kernel/exit.c:872 do_group_exit+0x135/0x370 kernel/exit.c:979 get_signal+0x3ec/0x1fc0 kernel/signal.c:2574 do_signal+0x95/0x1960 arch/x86/kernel/signal.c:821 exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x53d/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a219 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2c62803cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000075bf28 RCX: 000000000045a219 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075bf28 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000075bf2c R13: 00007ffcc149a28f R14: 00007f2c628049c0 R15: 000000000075bf2c The buggy address belongs to the page: page:ffffea000222c540 count:2 mapcount:0 mapping:ffff8880a6f90518 index:0x42c flags: 0x1fffc0000001064(referenced|lru|active|private) raw: 01fffc0000001064 ffffea00025f82c8 ffffea0002069a88 ffff8880a6f90518 raw: 000000000000042c ffff88808fe177e0 00000002ffffffff ffff88804ee46c80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88804ee46c80 Memory state around the buggy address: ffff888088b15f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888088b15f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888088b16000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888088b16080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888088b16100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================