bisecting fixing commit since b94de4d19498b454645b72d08a05d32fa9074fb5 building syzkaller on cba33199be220cbf61f7c0c8223d88a25a913d6f testing commit b94de4d19498b454645b72d08a05d32fa9074fb5 with gcc (GCC) 8.4.1 20210217 kernel signature: bd131d68e760931ea410e6a33578e25dd88a653484807e09b9269c4192ddae3f all runs: crashed: KASAN: use-after-free Read in ext4_xattr_set_entry testing current HEAD 255b58a2b3af0baa0ee11507390349217b8b73b0 testing commit 255b58a2b3af0baa0ee11507390349217b8b73b0 with gcc (GCC) 8.4.1 20210217 kernel signature: cd271b0022a31c803ddc493ea981171550c66248623a302ac8f21c907da908a7 all runs: crashed: KASAN: use-after-free Read in ext4_xattr_set_entry revisions tested: 2, total time: 23m32.63314778s (build: 15m1.398504746s, test: 7m34.730731842s) the crash still happens on HEAD commit msg: Linux 4.19.176 crash: KASAN: use-after-free Read in ext4_xattr_set_entry EXT4-fs error (device sda1): ext4_xattr_ibody_find:2196: inode #16001: comm syz-executor.0: corrupted in-inode xattr EXT4-fs error (device sda1): ext4_xattr_ibody_find:2196: inode #16002: comm syz-executor.5: corrupted in-inode xattr ================================================================== BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x2796/0x3880 fs/ext4/xattr.c:1604 Read of size 4 at addr ffff8881c825b004 by task syz-executor.5/11021 CPU: 1 PID: 11021 Comm: syz-executor.5 Not tainted 4.19.176-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x17c/0x226 lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:396 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 ext4_xattr_set_entry+0x2796/0x3880 fs/ext4/xattr.c:1604 ext4_xattr_ibody_set+0x70/0x290 fs/ext4/xattr.c:2243 ext4_xattr_set_handle+0x59d/0xc20 fs/ext4/xattr.c:2399 ext4_xattr_set+0x1bc/0x300 fs/ext4/xattr.c:2511 ext4_xattr_trusted_set+0x1e/0x20 fs/ext4/xattr_trusted.c:37 __vfs_setxattr+0xd9/0x140 fs/xattr.c:149 __vfs_setxattr_noperm+0xe9/0x380 fs/xattr.c:180 __vfs_setxattr_locked+0x185/0x200 fs/xattr.c:238 vfs_setxattr+0x101/0x280 fs/xattr.c:255 setxattr+0x1af/0x280 fs/xattr.c:520 path_setxattr+0x144/0x160 fs/xattr.c:539 __do_sys_setxattr fs/xattr.c:554 [inline] __se_sys_setxattr fs/xattr.c:550 [inline] __x64_sys_setxattr+0xbf/0x150 fs/xattr.c:550 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465889 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f146062e188 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 000000000055bfa8 RCX: 0000000000465889 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000020000100 RBP: 00000000004af68d R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000055bfa8 R13: 00007ffcc5449cff R14: 00007f146062e300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea00072096c0 count:0 mapcount:0 mapping:0000000000000000 index:0x1 flags: 0x17ff00000000000() raw: 017ff00000000000 ffffea0007206348 ffffea000720d5c8 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c825af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881c825af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881c825b000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881c825b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881c825b100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================