EXT4-fs error (device sda1): ext4_xattr_set_entry:1602: inode #16517: comm syz-fuzzer: corrupted xattr entries EXT4-fs error (device sda1): ext4_xattr_ibody_find:2192: inode #16610: comm restorecond: corrupted in-inode xattr EXT4-fs error (device sda1): ext4_xattr_ibody_find:2192: inode #16612: comm restorecond: corrupted in-inode xattr ================================================================== BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x24c7/0x2e10 fs/ext4/xattr.c:1599 Read of size 4 at addr ffff88019613e003 by task syz-executor0/7123 CPU: 0 PID: 7123 Comm: syz-executor0 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 ext4_xattr_set_entry+0x24c7/0x2e10 fs/ext4/xattr.c:1599 ext4_xattr_ibody_set+0x73/0x280 fs/ext4/xattr.c:2239 ext4_xattr_set_handle+0x6a6/0xd90 fs/ext4/xattr.c:2393 ext4_initxattrs+0xb8/0x110 fs/ext4/xattr_security.c:43 security_inode_init_security+0x228/0x310 security/security.c:493 __ext4_new_inode+0x3473/0x48e0 fs/ext4/ialloc.c:1166 ext4_create+0x233/0x500 fs/ext4/namei.c:2445 lookup_open+0xa95/0x1750 fs/namei.c:3229 do_last fs/namei.c:3320 [inline] path_openat+0xe6b/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:00007f82deb1cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569 RDX: 0000000000000000 RSI: 0000000000141042 RDI: 000000002000fffa RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f82deb1d6d4 R13: 00000000004efe9f R14: 00000000004d44e0 R15: 00000000ffffffff The buggy address belongs to the page: page:ffffea0006584f80 count:0 mapcount:-127 mapping: (null) index:0x1 flags: 0x4000000000000000() raw: 4000000000000000 0000000000000000 0000000000000001 00000000ffffff80 raw: ffffea0006571e20 ffffea0006580ea0 0000000000000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88019613df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88019613df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88019613e000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88019613e080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88019613e100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== SELinux: policydb magic number 0x6c06f698 does not match expected magic number 0xf97cff8c SELinux: failed to load policy