bisecting fixing commit since 5b7a52cd2eef952cee8a72512ef370bcdef46636 building syzkaller on 96e03c1c31a7f2e7f80b2d8b9f3df117df5030d1 testing commit 5b7a52cd2eef952cee8a72512ef370bcdef46636 with gcc (GCC) 8.1.0 kernel signature: 4340164c9e206391feafa872b1791dd1be6f0d288807ff619ddb2e6f405ecf7f all runs: crashed: KASAN: use-after-free Read in ext4_xattr_set_entry testing current HEAD 87335852c5d9ec629f80bb2257b9a9945962b719 testing commit 87335852c5d9ec629f80bb2257b9a9945962b719 with gcc (GCC) 8.1.0 kernel signature: 6414d861d89dfd3fac961fc74424a1c53096de3e377f3dc74a4c229dbb37559b all runs: crashed: KASAN: use-after-free Read in ext4_xattr_set_entry revisions tested: 2, total time: 22m53.39815657s (build: 15m56.119036523s, test: 6m25.812588955s) the crash still happens on HEAD commit msg: Linux 4.14.209 crash: KASAN: use-after-free Read in ext4_xattr_set_entry EXT4-fs error (device sda1): ext4_xattr_set_entry:1606: inode #15834: comm syz-executor.0: corrupted xattr entries EXT4-fs error (device sda1): ext4_xattr_set_entry:1606: inode #15845: comm syz-executor.5: 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 ffff8881c8d17004 by task syz-executor.0/10706 CPU: 1 PID: 10706 Comm: syz-executor.0 Not tainted 4.14.209-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:00007f843acd8c78 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: 00007ffd3963242f R14: 00007f843acd99c0 R15: 000000000118bfd4 The buggy address belongs to the page: page:ffffea00072345c0 count:0 mapcount:0 mapping: (null) index:0x1 flags: 0x17ff00000000000() raw: 017ff00000000000 0000000000000000 0000000000000001 00000000ffffffff raw: ffffea00072668e0 ffffea00071d9da0 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c8d16f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881c8d16f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881c8d17000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881c8d17080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881c8d17100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================