syzbot


KASAN: use-after-free Read in ntfs_are_names_equal

Status: upstream: reported C repro on 2020/09/29 06:04
Reported-by: syzbot+457dc47bd878ce9b2f2f@syzkaller.appspotmail.com
First crash: 1303d, last: 789d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Read in ntfs_are_names_equal C error 1 947d 1291d 0/1 upstream: reported C repro on 2020/10/11 09:28
upstream KASAN: use-after-free Read in ntfs_are_names_equal ntfs3 C error error 1 1290d 1288d 0/26 auto-obsoleted due to no activity on 2022/09/21 05:34
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/02/14 06:32 10m retest repro linux-4.14.y report log
2022/10/03 07:30 11m retest repro linux-4.14.y report log
Fix bisection attempts (18)
Created Duration User Patch Repo Result
2022/03/29 16:04 13m bisect fix linux-4.14.y error job log (0)
2022/02/25 18:30 33m bisect fix linux-4.14.y job log (0) log
2022/01/26 18:02 28m bisect fix linux-4.14.y job log (0) log
2021/12/27 17:26 26m bisect fix linux-4.14.y job log (0) log
2021/11/27 17:01 24m bisect fix linux-4.14.y job log (0) log
2021/10/28 16:30 31m bisect fix linux-4.14.y job log (0) log
2021/09/24 16:51 27m bisect fix linux-4.14.y job log (0) log
2021/08/25 16:20 26m bisect fix linux-4.14.y job log (0) log
2021/07/26 15:30 29m bisect fix linux-4.14.y job log (0) log
2021/06/26 15:01 29m bisect fix linux-4.14.y job log (0) log
2021/05/27 14:29 32m bisect fix linux-4.14.y job log (0) log
2021/04/27 12:50 26m bisect fix linux-4.14.y job log (0) log
2021/03/28 10:13 21m bisect fix linux-4.14.y job log (0) log
2021/02/26 09:47 21m bisect fix linux-4.14.y job log (0) log
2021/01/27 09:12 24m bisect fix linux-4.14.y job log (0) log
2020/12/28 08:11 23m bisect fix linux-4.14.y job log (0) log
2020/11/28 07:20 26m bisect fix linux-4.14.y job log (0) log
2020/10/29 06:51 29m bisect fix linux-4.14.y job log (0) log

Sample crash report:
ntfs: volume version 3.1.
ntfs: volume version 3.1.
ntfs: volume version 3.1.
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+0x143/0x150 fs/ntfs/unistr.c:75
Read of size 2 at addr ffff888080ff6ee8 by task syz-executor300/6360

CPU: 1 PID: 6360 Comm: syz-executor300 Not tainted 4.14.198-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+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load2_noabort+0x68/0x70 mm/kasan/report.c:428
 ntfs_ucsncmp fs/ntfs/unistr.c:156 [inline]
 ntfs_are_names_equal+0x143/0x150 fs/ntfs/unistr.c:75
 ntfs_attr_find+0x36f/0xa10 fs/ntfs/attrib.c:628
 ntfs_attr_lookup+0xeca/0x1f30 fs/ntfs/attrib.c:1203
 ntfs_read_locked_attr_inode fs/ntfs/inode.c:1266 [inline]
 ntfs_attr_iget+0x641/0x2180 fs/ntfs/inode.c:251
 ntfs_read_locked_inode+0x24a2/0x5000 fs/ntfs/inode.c:986
 ntfs_iget+0xfa/0x130 fs/ntfs/inode.c:190
 load_system_files fs/ntfs/super.c:1988 [inline]
 ntfs_fill_super+0x4caf/0x7170 fs/ntfs/super.c:2908
 mount_bdev+0x2b3/0x360 fs/super.c:1134
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2549 [inline]
 do_mount+0xe53/0x2a00 fs/namespace.c:2879
 SYSC_mount fs/namespace.c:3095 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3072
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x44955a
RSP: 002b:00007fff358d5f58 EFLAGS: 00000287 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff358d5fb0 RCX: 000000000044955a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fff358d5f70
RBP: 00007fff358d5f70 R08: 00007fff358d5fb0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000287 R12: 00000000000000ab
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003

The buggy address belongs to the page:
page:ffffea000203fd80 count:1 mapcount:0 mapping:ffff888094cfd848 index:0x7f7e
flags: 0xfffe000004003c(referenced|uptodate|dirty|lru|swapbacked)
raw: 00fffe000004003c ffff888094cfd848 0000000000007f7e 00000001ffffffff
raw: ffffea00020f74a0 ffffea00020e7720 0000000000000000 ffff8880aa3f6a40
page dumped because: kasan: bad access detected
page->mem_cgroup:ffff8880aa3f6a40

Memory state around the buggy address:
 ffff888080ff6d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888080ff6e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888080ff6e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                                          ^
 ffff888080ff6f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888080ff6f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/29 06:03 linux-4.14.y cbfa1702aaf6 1b88c6d5 .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.