bisecting fixing commit since a1b977b49b66c75e6c51a515f6700371ae720217 building syzkaller on 4a77ae0bdc5cd75ebe88ce7c896aae6bbf457a29 testing commit a1b977b49b66c75e6c51a515f6700371ae720217 with gcc (GCC) 8.1.0 kernel signature: b5212bcb3b9dc920790f6c1821e7993cf25b910827ab1fd1952e7115dc5657d9 all runs: crashed: KASAN: use-after-free Read in ntfs_are_names_equal testing current HEAD 4143d798313fffa39f05bf24dd560ace42225c26 testing commit 4143d798313fffa39f05bf24dd560ace42225c26 with gcc (GCC) 8.1.0 kernel signature: 98e89e2d3b6ec423a7b635243a2606735043d771b9eeb137c55f98159c7aa8b5 all runs: crashed: KASAN: use-after-free Read in ntfs_are_names_equal revisions tested: 2, total time: 24m34.489543208s (build: 18m33.30763423s, test: 5m27.233496266s) the crash still happens on HEAD commit msg: Linux 4.19.165 crash: KASAN: use-after-free Read in ntfs_are_names_equal ntfs: (device loop2): load_and_init_upcase(): Failed to load $UpCase from the volume. Using default. ntfs: volume version 3.1. ntfs: (device loop2): map_mft_record_page(): Mft record 0x2 is corrupt. Run chkdsk. ntfs: volume version 3.1. ================================================================== BUG: KASAN: use-after-free in ntfs_ucsncmp fs/ntfs/unistr.c:156 [inline] BUG: KASAN: use-after-free in ntfs_are_names_equal+0x178/0x1a0 fs/ntfs/unistr.c:75 Read of size 2 at addr ffff8881c6cf7ee8 by task syz-executor.2/7474 CPU: 0 PID: 7474 Comm: syz-executor.2 Not tainted 4.19.165-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/0x22a 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.cold.7+0x242/0x307 mm/kasan/report.c:412 __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:431 ntfs_ucsncmp fs/ntfs/unistr.c:156 [inline] ntfs_are_names_equal+0x178/0x1a0 fs/ntfs/unistr.c:75 ntfs_attr_find+0x36c/0xb60 fs/ntfs/attrib.c:628 ntfs_external_attr_find fs/ntfs/attrib.c:1107 [inline] ntfs_attr_lookup+0x1077/0x2590 fs/ntfs/attrib.c:1205 ntfs_read_locked_attr_inode fs/ntfs/inode.c:1258 [inline] ntfs_attr_iget+0x702/0x2370 fs/ntfs/inode.c:251 ntfs_read_locked_inode+0x25d3/0x51e0 fs/ntfs/inode.c:979 ntfs_iget+0xe6/0x120 fs/ntfs/inode.c:190 load_system_files fs/ntfs/super.c:1988 [inline] ntfs_fill_super+0x4b63/0x79d0 fs/ntfs/super.c:2908 mount_bdev+0x26f/0x330 fs/super.c:1158 ntfs_mount+0x10/0x20 fs/ntfs/super.c:3065 mount_fs+0x7f/0x2a2 fs/super.c:1261 vfs_kern_mount.part.11+0x58/0x3d0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2469 [inline] do_mount+0x376/0x2710 fs/namespace.c:2799 ksys_mount+0xba/0xe0 fs/namespace.c:3015 __do_sys_mount fs/namespace.c:3029 [inline] __se_sys_mount fs/namespace.c:3026 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3026 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4608aa Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 ad 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 8a 89 fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f3832fb3a88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f3832fb3b20 RCX: 00000000004608aa RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f3832fb3ae0 RBP: 00007f3832fb3ae0 R08: 00007f3832fb3b20 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000200 R15: 000000002007dc00 The buggy address belongs to the page: page:ffffea00071b3dc0 count:0 mapcount:0 mapping:0000000000000000 index:0x1 flags: 0x17ffe0000000000() raw: 017ffe0000000000 ffffea00071b3e08 ffff8881f662fe28 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c6cf7d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881c6cf7e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881c6cf7e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881c6cf7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881c6cf7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================