bisecting fixing commit since 5b7a52cd2eef952cee8a72512ef370bcdef46636 building syzkaller on 96e03c1c31a7f2e7f80b2d8b9f3df117df5030d1 testing commit 5b7a52cd2eef952cee8a72512ef370bcdef46636 with gcc (GCC) 8.1.0 kernel signature: 0c29111e12ad52bb18ce02694a4ec49f7a17aee141206bf4845cdb7e24a48ee9 all runs: crashed: KASAN: use-after-free Read in ext4_xattr_set_entry testing current HEAD 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae testing commit 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae with gcc (GCC) 8.1.0 kernel signature: 488be29730135859b7f79dbe2bead518cba588a9c8257fef5fc08f5d73697c84 all runs: crashed: KASAN: use-after-free Read in ext4_xattr_set_entry revisions tested: 2, total time: 25m40.311488144s (build: 16m59.111168686s, test: 7m54.730556975s) the crash still happens on HEAD commit msg: Linux 4.14.212 crash: KASAN: use-after-free Read in ext4_xattr_set_entry EXT4-fs error (device sda1): ext4_xattr_set_entry:1606: inode #15807: comm syz-executor.3: corrupted xattr entries EXT4-fs error (device sda1): ext4_xattr_set_entry:1606: inode #15795: comm syz-executor.2: corrupted xattr entries ================================================================== BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x2777/0x3730 fs/ext4/xattr.c:1603 Read of size 4 at addr ffff8881c914c004 by task syz-executor.0/9978 CPU: 1 PID: 9978 Comm: syz-executor.0 Not tainted 4.14.212-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/0x1f1 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/0x2d4 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:00007fac0a433c78 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: 00007ffe14b2e75f R14: 00007fac0a4349c0 R15: 000000000118bfd4 The buggy address belongs to the page: page:ffffea0007245300 count:0 mapcount:0 mapping: (null) index:0x1 flags: 0x17ff00000000000() raw: 017ff00000000000 0000000000000000 0000000000000001 00000000ffffffff raw: ffffea00072472a0 ffffea00071c1760 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c914bf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881c914bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881c914c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881c914c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881c914c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================