EXT4-fs error (device sda1): ext4_xattr_set_entry:1605: inode #16552: comm syz-executor.1: corrupted xattr entries EXT4-fs error (device sda1): ext4_xattr_set_entry:1605: inode #16507: comm syz-executor.1: corrupted xattr entries ================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:332 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize.isra.0+0x10b/0x1c0 fs/ext4/inode.c:5832 Write of size 3586 at addr ffff8881a9a815a0 by task syz-executor.1/25114 CPU: 1 PID: 25114 Comm: syz-executor.1 Not tainted 4.14.151+ #0 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 lib/dump_stack.c:53 print_address_description+0x60/0x226 mm/kasan/report.c:187 __kasan_report.cold+0x1a/0x41 mm/kasan/report.c:316 memset+0x20/0x40 mm/kasan/common.c:113 memset include/linux/string.h:332 [inline] __ext4_expand_extra_isize.isra.0+0x10b/0x1c0 fs/ext4/inode.c:5832 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5884 [inline] ext4_mark_inode_dirty+0x471/0x7f0 fs/ext4/inode.c:5960 ext4_evict_inode+0x6a6/0x1560 fs/ext4/inode.c:282 evict+0x2cb/0x5f0 fs/inode.c:554 iput_final fs/inode.c:1516 [inline] iput fs/inode.c:1543 [inline] iput+0x385/0x7f0 fs/inode.c:1528 dentry_unlink_inode+0x25f/0x320 fs/dcache.c:387 __dentry_kill+0x325/0x560 fs/dcache.c:591 dentry_kill fs/dcache.c:632 [inline] dput.part.0+0x4b5/0x710 fs/dcache.c:847 dput+0x1b/0x30 fs/dcache.c:811 path_put+0x2d/0x60 fs/namei.c:519 free_fs_struct+0x1e/0x60 fs/fs_struct.c:91 exit_fs+0xdc/0x110 fs/fs_struct.c:109 do_exit+0x9a8/0x2a20 kernel/exit.c:871 do_group_exit+0x100/0x2e0 kernel/exit.c:978 get_signal+0x39f/0x1cc0 kernel/signal.c:2422 do_signal+0x96/0x15d0 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x11d/0x160 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x3a3/0x520 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459f49 RSP: 002b:00007fb32373ccf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000075bf28 RCX: 0000000000459f49 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075bf28 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000075bf2c R13: 00007ffef975966f R14: 00007fb32373d9c0 R15: 000000000075bf2c The buggy address belongs to the page: page:ffffea0006a6a040 count:2 mapcount:0 mapping:ffff8881da4170d0 index:0x42c flags: 0x400000000000203a(referenced|dirty|lru|active|private) raw: 400000000000203a ffff8881da4170d0 000000000000042c 00000002ffffffff raw: ffffea0006a6aa60 ffffea0006a7b6e0 ffff8881d53257e0 ffff8881da81aa80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8881da81aa80 Memory state around the buggy address: ffff8881a9a81f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881a9a81f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881a9a82000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881a9a82080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881a9a82100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================