syzbot


possible deadlock in mi_read

Status: upstream: reported C repro on 2023/03/17 09:05
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+e734ffa9b17a318863d2@syzkaller.appspotmail.com
First crash: 628d, last: 26d
Fix commit to backport (bisect log) :
tree: upstream
commit 03b097099eef255fbf85ea6a786ae3c91b11f041
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Wed Aug 28 08:55:53 2024 +0000

  fs/ntfs3: Fix possible deadlock in mi_read

  
Bug presence (3)
Date Name Commit Repro Result
2024/10/25 linux-6.1.y (ToT) 7ec6f9fa3d97 C [report] possible deadlock in mi_read
2024/01/05 upstream (ToT) 1f874787ed9a C [report] possible deadlock in mi_read
2024/10/25 upstream (ToT) ae90f6a6170d C Didn't crash
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in mi_read ntfs3 C error 11141 22d 795d 28/28 fixed on 2024/11/12 23:31
upstream possible deadlock in mi_read (2) ntfs3 C inconclusive 20 5h24m 17d 0/28 upstream: reported C repro on 2024/11/17 08:21
linux-5.15 possible deadlock in mi_read origin:upstream missing-backport C 827 26d 631d 0/3 upstream: reported C repro on 2023/03/14 03:50
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/11/08 04:22 5h12m fix candidate upstream OK (1) job log

Sample crash report:
WARNING: The mand mount option has been deprecated and
         and is ignored by this kernel. Remove the mand
         option from the mount to silence this warning.
=======================================================
ntfs3: loop0: Different NTFS' sector size (4096) and media sector size (512)
ntfs3: loop0: Mark volume as dirty due to NTFS errors
============================================
WARNING: possible recursive locking detected
6.1.70-syzkaller #0 Not tainted
--------------------------------------------
syz-executor146/3541 is trying to acquire lock:
ffff888071091e80 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
ffff888071091e80 (&ni->ni_lock/4){+.+.}-{3:3}, at: mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148

but task is already holding lock:
ffff888071096840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
ffff888071096840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf5/0x1f0 fs/ntfs3/namei.c:82

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&ni->ni_lock/4);
  lock(&ni->ni_lock/4);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syz-executor146/3541:
 #0: ffff888071096ae0 (&type->i_mutex_dir_key#6){.+.+}-{3:3}, at: inode_lock_shared include/linux/fs.h:766 [inline]
 #0: ffff888071096ae0 (&type->i_mutex_dir_key#6){.+.+}-{3:3}, at: lookup_slow+0x45/0x70 fs/namei.c:1702
 #1: ffff888071096840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
 #1: ffff888071096840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf5/0x1f0 fs/ntfs3/namei.c:82

stack backtrace:
CPU: 1 PID: 3541 Comm: syz-executor146 Not tainted 6.1.70-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline]
 check_deadlock kernel/locking/lockdep.c:3026 [inline]
 validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
 ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
 mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148
 ntfs_read_mft fs/ntfs3/inode.c:69 [inline]
 ntfs_iget5+0x48a/0x3900 fs/ntfs3/inode.c:524
 dir_search_u+0x2f6/0x390 fs/ntfs3/dir.c:264
 ntfs_lookup+0x102/0x1f0 fs/ntfs3/namei.c:83
 __lookup_slow+0x27e/0x3d0 fs/namei.c:1686
 lookup_slow+0x53/0x70 fs/namei.c:1703
 walk_component+0x2d0/0x400 fs/namei.c:1994
 lookup_last fs/namei.c:2451 [inline]
 path_lookupat+0x16f/0x450 fs/namei.c:2475
 filename_lookup+0x251/0x600 fs/namei.c:2504
 user_path_at_empty+0x3e/0x60 fs/namei.c:2877
 user_path_at include/linux/namei.h:57 [inline]
 path_getxattr+0xda/0x410 fs/xattr.c:748
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc410721639
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffecba21f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bf
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007fc410721639
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000002001f740
RBP: 00007fc4107b3610 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000

Crashes (828):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/05 00:55 linux-6.1.y a507f147e6f0 28c42cff .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/05/02 10:12 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/05/02 09:51 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/02/25 15:12 linux-6.1.y 81e1dc2f7001 8d446f15 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/01/28 00:52 linux-6.1.y 883d1a956208 cc4a4020 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/01/20 21:54 linux-6.1.y 8fd7f4462453 9bd8dcda .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/01/04 23:54 linux-6.1.y a507f147e6f0 28c42cff .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2023/09/25 17:34 linux-6.1.y d23900f974e0 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2023/09/13 21:35 linux-6.1.y 09045dae0d90 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2023/05/07 07:39 linux-6.1.y ca48fc16c493 90c93c40 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2023/06/04 10:16 linux-6.1.y d2869ace6eeb a4ae4f42 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in mi_read
2023/05/05 07:57 linux-6.1.y ca48fc16c493 518a39a6 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/11/08 13:22 linux-6.1.y 7c15117f9468 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/11/08 06:36 linux-6.1.y 7c15117f9468 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/11/06 00:36 linux-6.1.y 7c15117f9468 da38b4c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/11/04 07:20 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/11/04 04:28 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/22 19:23 linux-6.1.y 7ec6f9fa3d97 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/18 06:01 linux-6.1.y 54d90d17e8ce 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/15 10:23 linux-6.1.y aa4cd140bba5 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/15 08:40 linux-6.1.y aa4cd140bba5 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/15 04:15 linux-6.1.y aa4cd140bba5 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/12 07:09 linux-6.1.y aa4cd140bba5 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/11 22:27 linux-6.1.y aa4cd140bba5 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/11 06:45 linux-6.1.y aa4cd140bba5 cd942402 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/10 16:36 linux-6.1.y aa4cd140bba5 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/10 03:46 linux-6.1.y aa4cd140bba5 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/08 15:47 linux-6.1.y aa4cd140bba5 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/08 05:18 linux-6.1.y aa4cd140bba5 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/03 16:40 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/03 04:07 linux-6.1.y aa4cd140bba5 a4c7fd36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/02 12:25 linux-6.1.y aa4cd140bba5 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/01 12:24 linux-6.1.y aa4cd140bba5 ea2b66a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/28 22:33 linux-6.1.y e526b12bf916 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/27 19:26 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/26 08:11 linux-6.1.y e526b12bf916 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/25 21:57 linux-6.1.y e526b12bf916 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/25 09:21 linux-6.1.y e526b12bf916 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/25 03:20 linux-6.1.y e526b12bf916 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/25 02:11 linux-6.1.y e526b12bf916 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/11/07 13:33 linux-6.1.y 7c15117f9468 867e44df .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/11/06 18:20 linux-6.1.y 7c15117f9468 df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/11/06 09:13 linux-6.1.y 7c15117f9468 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/11/05 14:01 linux-6.1.y 7c15117f9468 da38b4c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/11/04 03:14 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/11/03 14:08 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/11/03 03:19 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/11/01 04:45 linux-6.1.y 7c15117f9468 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/27 12:44 linux-6.1.y 7ec6f9fa3d97 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/25 13:51 linux-6.1.y 7ec6f9fa3d97 045e728d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/25 02:46 linux-6.1.y 7ec6f9fa3d97 c79b8ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/20 22:43 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/18 03:12 linux-6.1.y 54d90d17e8ce 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/17 03:06 linux-6.1.y aa4cd140bba5 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/16 21:10 linux-6.1.y aa4cd140bba5 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/16 20:00 linux-6.1.y aa4cd140bba5 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/16 09:02 linux-6.1.y aa4cd140bba5 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/10 03:42 linux-6.1.y aa4cd140bba5 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/02 14:01 linux-6.1.y aa4cd140bba5 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2023/03/17 09:05 linux-6.1.y 6449a0ba6843 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
* Struck through repros no longer work on HEAD.