bisecting fixing commit since 5b7a52cd2eef952cee8a72512ef370bcdef46636 building syzkaller on 96e03c1c31a7f2e7f80b2d8b9f3df117df5030d1 testing commit 5b7a52cd2eef952cee8a72512ef370bcdef46636 with gcc (GCC) 8.1.0 kernel signature: 10ebec9d1d6f08831d727ca440af60299b8e3a0053be481d9a8525a34481948e all runs: crashed: KASAN: use-after-free Read in ext4_xattr_set_entry testing current HEAD 2d2791fce891fc20709232d49a6bae075b9a77f8 testing commit 2d2791fce891fc20709232d49a6bae075b9a77f8 with gcc (GCC) 8.1.0 kernel signature: d895fa27d4a5c4da535929ccc4dda9788f75e0fddff3f7fba2126b38d045c790 all runs: crashed: KASAN: use-after-free Read in ext4_xattr_set_entry revisions tested: 2, total time: 31m46.483627532s (build: 19m17.275771032s, test: 11m53.494649757s) the crash still happens on HEAD commit msg: Linux 4.14.217 crash: KASAN: use-after-free Read in ext4_xattr_set_entry EXT4-fs (sda1): Unrecognized mount option "fscontext=user_u" or missing value EXT4-fs (sda1): Unrecognized mount option "fscontext=user_u" or missing value EXT4-fs (sda1): Unrecognized mount option "fscontext=user_u" or missing value ================================================================== BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x2777/0x3730 fs/ext4/xattr.c:1603 Read of size 4 at addr ffff8881c70e1004 by task syz-executor.3/669 CPU: 1 PID: 669 Comm: syz-executor.3 Not tainted 4.14.217-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x14b/0x1e7 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 ext4_xattr_set_entry+0x2777/0x3730 fs/ext4/xattr.c:1603 ext4_xattr_ibody_set+0x70/0x290 fs/ext4/xattr.c:2242 ext4_xattr_set_handle+0x57c/0xc40 fs/ext4/xattr.c:2398 ext4_xattr_set+0x1b4/0x2e0 fs/ext4/xattr.c:2510 ext4_xattr_trusted_set+0x1e/0x20 fs/ext4/xattr_trusted.c:37 __vfs_setxattr+0xd1/0x130 fs/xattr.c:150 __vfs_setxattr_noperm+0xe9/0x380 fs/xattr.c:181 __vfs_setxattr_locked+0x182/0x200 fs/xattr.c:239 vfs_setxattr+0xf5/0x260 fs/xattr.c:256 setxattr+0x1a0/0x250 fs/xattr.c:523 path_setxattr+0x130/0x150 fs/xattr.c:542 SYSC_setxattr fs/xattr.c:557 [inline] SyS_setxattr+0xf/0x20 fs/xattr.c:553 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45de49 RSP: 002b:00007fcd89a48c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 0000000000033980 RCX: 000000000045de49 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000020000100 RBP: 000000000118c018 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bfd4 R13: 00007ffe1046131f R14: 00007fcd89a499c0 R15: 000000000118bfd4 The buggy address belongs to the page: page:ffffea00071c3840 count:0 mapcount:0 mapping: (null) index:0x1 flags: 0x17ff00000000000() raw: 017ff00000000000 0000000000000000 0000000000000001 00000000ffffffff raw: ffffea000723f820 ffffea00073976a0 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c70e0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881c70e0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881c70e1000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881c70e1080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881c70e1100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================