EXT4-fs (sda1): Ignoring removed bh option EXT4-fs error (device sda1): ext4_xattr_set_entry:1602: inode #17990: comm syz-executor4: corrupted xattr entries EXT4-fs (sda1): re-mounted. Opts: i_version,grpquota,stripe=0x0000000000000001,debug_want_extra_isize=0x0000000000000401,nobarrier,nolazytime,bh,,errors=continue EXT4-fs error (device sda1): ext4_xattr_set_entry:1602: inode #16583: comm syz-executor5: 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 993 at addr ffff88019817bca0 by task syz-executor1/22393 CPU: 0 PID: 22393 Comm: syz-executor1 Not tainted 4.14.78+ #26 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_dirty+0x10d/0x150 fs/ext4/extents.c:177 ext4_ext_remove_space+0xb3a/0x3730 fs/ext4/extents.c:3064 ext4_ext_truncate+0x19e/0x1f0 fs/ext4/extents.c:4656 ext4_truncate+0x907/0x11c0 fs/ext4/inode.c:4460 ext4_setattr+0x12a3/0x2280 fs/ext4/inode.c:5523 notify_change2+0xad7/0xdd0 fs/attr.c:315 do_truncate2+0x10f/0x1c0 fs/open.c:63 handle_truncate fs/namei.c:2998 [inline] do_last fs/namei.c:3417 [inline] path_openat+0xaea/0x23a0 fs/namei.c:3550 do_filp_open+0x197/0x270 fs/namei.c:3584 do_sys_open+0x2ef/0x580 fs/open.c:1071 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457569 RSP: 002b:00007f787304ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 0000000000457569 RDX: 0000000000000000 RSI: 000000000000000e RDI: 0000000020000300 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f787304b6d4 R13: 00000000004bdb2f R14: 00000000004cc908 R15: 00000000ffffffff The buggy address belongs to the page: page:ffffea0006605ec0 count:2 mapcount:0 mapping:ffff8801da4114d0 index:0x485 flags: 0x4000000000001074(referenced|dirty|lru|active|private) raw: 4000000000001074 ffff8801da4114d0 0000000000000485 00000002ffffffff raw: ffffea000660e4a0 ffffea00065d1060 ffff8801b10c6498 ffff8801da81aa80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8801da81aa80 Memory state around the buggy address: ffff88019817bf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88019817bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88019817c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88019817c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88019817c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================