bisecting fixing commit since a1b977b49b66c75e6c51a515f6700371ae720217 building syzkaller on 4a77ae0bdc5cd75ebe88ce7c896aae6bbf457a29 testing commit a1b977b49b66c75e6c51a515f6700371ae720217 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: e5f42d7cd94d249e1ae05b0d0acff2eb97b11cd69036cb78d30a473bba46a0aa run #0: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #1: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #2: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #3: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #4: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #5: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #6: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #7: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #8: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #9: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #10: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #11: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #12: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #13: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #14: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #15: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #16: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #17: crashed: KASAN: out-of-bounds Read in ntfs_are_names_equal run #18: crashed: KASAN: use-after-free Read in ntfs_are_names_equal run #19: crashed: KASAN: use-after-free Read in ntfs_are_names_equal testing current HEAD 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 testing commit 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 219046629ad00d675fc55ec020f2c7ac859149fe48ae4cd41e73a01455a2dd6a all runs: crashed: KASAN: use-after-free Read in ntfs_are_names_equal revisions tested: 2, total time: 28m42.452027217s (build: 21m46.252125617s, test: 6m25.323600555s) the crash still happens on HEAD commit msg: Linux 4.19.204 crash: KASAN: use-after-free Read in ntfs_are_names_equal IPv6: ADDRCONF(NETDEV_UP): batadv_slave_0: link is not ready ntfs: volume version 3.1. batman_adv: batadv0: Interface activated: batadv_slave_0 ntfs: (device loop2): map_mft_record_page(): Mft record 0x2 is corrupt. Run chkdsk. ================================================================== 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 ffff8881c93a3ee8 by task syz-executor.2/7291 CPU: 1 PID: 7291 Comm: syz-executor.2 Not tainted 4.19.204-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_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:1264 [inline] ntfs_attr_iget+0x702/0x2370 fs/ntfs/inode.c:251 ntfs_read_locked_inode+0x24b9/0x5030 fs/ntfs/inode.c:985 ntfs_iget+0xe6/0x120 fs/ntfs/inode.c:190 load_system_files fs/ntfs/super.c:1988 [inline] ntfs_fill_super+0x4b4f/0x79c0 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/0x2b0 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:2483 [inline] do_mount+0x376/0x2630 fs/namespace.c:2813 ksys_mount+0xb1/0xd0 fs/namespace.c:3029 __do_sys_mount fs/namespace.c:3043 [inline] __se_sys_mount fs/namespace.c:3040 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3040 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466d6a Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 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:00007fb2d99a4fa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 0000000000466d6a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fb2d99a5000 RBP: 00007fb2d99a5040 R08: 00007fb2d99a5040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007fb2d99a5000 R15: 000000002007dc00 The buggy address belongs to the page: page:ffffea000724e8c0 count:0 mapcount:0 mapping:0000000000000000 index:0x1 flags: 0x17ffe0000000000() raw: 017ffe0000000000 ffffea000724e9c8 ffffea0007246c08 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c93a3d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881c93a3e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Bluetooth: hci5: command 0x0419 tx timeout >ffff8881c93a3e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881c93a3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881c93a3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Bluetooth: hci2: command 0x0419 tx timeout IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 Bluetooth: hci0: command 0x0419 tx timeout Bluetooth: hci1: command 0x0419 tx timeout Bluetooth: hci3: command 0x0419 tx timeout Bluetooth: hci4: command 0x0419 tx timeout batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 ntfs: volume version 3.1. batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready ntfs: volume version 3.1. IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready ntfs: volume version 3.1. IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready ntfs: volume version 3.1. IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready ntfs: volume version 3.1. wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready ntfs: volume version 3.1. IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 ntfs: volume version 3.1. wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready ntfs: volume version 3.1. IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. __ntfs_warning: 1664 callbacks suppressed ntfs: (device loop4): is_boot_sector_ntfs(): Invalid end of sector marker. ntfs: (device loop4): map_mft_record_page(): Mft record 0x1 is corrupt. Run chkdsk. ntfs: (device loop2): is_boot_sector_ntfs(): Invalid end of sector marker. ntfs: (device loop4): map_mft_record(): Failed with error code 5. ntfs: (device loop1): is_boot_sector_ntfs(): Invalid end of sector marker. ntfs: (device loop4): ntfs_read_locked_inode(): Failed with error code -5. Marking corrupt inode 0x1 as bad. Run chkdsk. ntfs: (device loop4): load_system_files(): Failed to load $MFTMirr. Mounting read-only. Run ntfsfix and/or chkdsk. ntfs: (device loop0): is_boot_sector_ntfs(): Invalid end of sector marker. ntfs: (device loop4): map_mft_record_page(): Mft record 0xa is corrupt. Run chkdsk. ntfs: (device loop4): map_mft_record(): Failed with error code 5. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. ntfs: volume version 3.1. __ntfs_error: 1997 callbacks suppressed ntfs: (device loop4): map_mft_record_page(): Mft record 0x2 is corrupt. Run chkdsk. ntfs: (device loop4): map_mft_record(): Failed with error code 5. ntfs: (device loop4): ntfs_read_locked_inode(): Failed with error code -5. Marking corrupt inode 0x2 as bad. Run chkdsk. ntfs: (device loop4): load_system_files(): Failed to load $LogFile. Will not be able to remount read-write. Mount in Windows. ntfs: (device loop4): ntfs_read_locked_attr_inode(): Failed with error code -2 while reading attribute inode (mft_no 0x5, type 0xb0, name_len 4). Marking corrupt inode and base inode 0x5 as bad. Run chkdsk. ntfs: (device loop4): ntfs_read_locked_inode(): Failed to get bitmap attribute. ntfs: (device loop4): ntfs_read_locked_inode(): Failed with error code -2. Marking corrupt inode 0x5 as bad. Run chkdsk. ntfs: (device loop4): load_system_files(): Failed to load root directory. ntfs: (device loop4): ntfs_fill_super(): Failed to load system files.