EXT4-fs error (device sda1): ext4_xattr_ibody_find:2192: inode #16556: comm syz-executor4: corrupted in-inode xattr EXT4-fs error (device sda1): ext4_xattr_set_entry:1602: inode #16539: comm syz-executor2: corrupted xattr entries ================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:329 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize.isra.13+0x108/0x1b0 fs/ext4/inode.c:5780 Write of size 4063 at addr ffff8801ad22c5a0 by task syz-executor2/4732 CPU: 0 PID: 4732 Comm: syz-executor2 Not tainted 4.14.74+ #17 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_address_description+0x60/0x22b mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409 memset+0x1f/0x40 mm/kasan/kasan.c:285 memset include/linux/string.h:329 [inline] __ext4_expand_extra_isize.isra.13+0x108/0x1b0 fs/ext4/inode.c:5780 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5832 [inline] ext4_mark_inode_dirty+0x46c/0x7e0 fs/ext4/inode.c:5908 ext4_ext_truncate+0x91/0x1f0 fs/ext4/extents.c:4640 ext4_truncate+0x907/0x11c0 fs/ext4/inode.c:4460 ext4_evict_inode+0x6df/0x1520 fs/ext4/inode.c:289 evict+0x2cb/0x5f0 fs/inode.c:554 iput_final fs/inode.c:1516 [inline] iput+0x373/0x8e0 fs/inode.c:1543 dentry_unlink_inode+0x25c/0x310 fs/dcache.c:373 __dentry_kill+0x31b/0x590 fs/dcache.c:577 dentry_kill fs/dcache.c:618 [inline] dput.part.6+0x4b5/0x710 fs/dcache.c:833 dput+0x1b/0x30 fs/dcache.c:797 path_put+0x2d/0x60 fs/namei.c:516 free_fs_struct+0x1e/0x60 fs/fs_struct.c:91 exit_fs+0xd6/0x110 fs/fs_struct.c:109 do_exit+0x8d5/0x2800 kernel/exit.c:861 do_group_exit+0x100/0x2e0 kernel/exit.c:968 get_signal+0x4e5/0x1470 kernel/signal.c:2348 do_signal+0x8f/0x1660 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x116/0x150 arch/x86/entry/common.c:159 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:267 [inline] do_syscall_64+0x35d/0x4b0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457579 RSP: 002b:00007f530076ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000023 RAX: fffffffffffffdfc RBX: 0000000000000002 RCX: 0000000000457579 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 00000000200002c0 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f530076f6d4 R13: 00000000004bd9e2 R14: 00000000004d3fc0 R15: 00000000ffffffff The buggy address belongs to the page: page:ffffea0006b48b00 count:2 mapcount:0 mapping:ffff8801d9aa8950 index:0x42a flags: 0x4000000000001074(referenced|dirty|lru|active|private) raw: 4000000000001074 ffff8801d9aa8950 000000000000042a 00000002ffffffff raw: ffffea0006b442a0 ffffea0006b43160 ffff8801c45aa7e0 ffff8801da81aa80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8801da81aa80 Memory state around the buggy address: ffff8801ad22cf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801ad22cf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801ad22d000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8801ad22d080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8801ad22d100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================