syzbot


possible deadlock in ntfs_set_state

Status: auto-obsoleted due to no activity on 2025/01/17 06:08
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+bbfc7e799e7ae709f809@syzkaller.appspotmail.com
First crash: 498d, last: 74d
Bug presence (2)
Date Name Commit Repro Result
2023/09/17 linux-5.15.y (ToT) aff03380bda4 C [report] possible deadlock in ntfs_set_state
2023/09/17 upstream (ToT) e789286468a9 C Didn't crash
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in ntfs_set_state (2) ntfs3 C error 943 102d 343d 28/28 fixed on 2024/11/12 23:31
linux-6.1 possible deadlock in ntfs_set_state origin:upstream missing-backport C inconclusive 194 75d 673d 0/3 upstream: reported C repro on 2023/03/21 01:37
upstream possible deadlock in ntfs_set_state ntfs3 C done done 1360 369d 762d 25/28 fixed on 2024/01/30 15:47
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/11/22 07:28 26m retest repro linux-5.15.y OK log
2024/11/22 06:35 20m retest repro linux-5.15.y OK log
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/10/19 10:11 2h55m fix candidate upstream OK (0) job log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
5.15.170-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor/4169 is trying to acquire lock:
ffff888062fd2d40 (&ni->ni_lock){+.+.}-{3:3}, at: ntfs_set_state+0x1fa/0x660 fs/ntfs3/fsntfs.c:925

but task is already holding lock:
ffff888062dead40 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1100 [inline]
ffff888062dead40 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_unlink_inode+0x31d/0x760 fs/ntfs3/inode.c:1741

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&ni->ni_lock/4){+.+.}-{3:3}:
       lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
       __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       ni_lock fs/ntfs3/ntfs_fs.h:1100 [inline]
       mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148
       ntfs_read_mft fs/ntfs3/inode.c:69 [inline]
       ntfs_iget5+0x472/0x38e0 fs/ntfs3/inode.c:525
       ni_update_parent+0x93f/0xdc0 fs/ntfs3/frecord.c:3154
       ni_write_inode+0xe32/0x1070 fs/ntfs3/frecord.c:3252
       write_inode fs/fs-writeback.c:1495 [inline]
       __writeback_single_inode+0x644/0xe30 fs/fs-writeback.c:1705
       writeback_single_inode+0x22c/0x960 fs/fs-writeback.c:1760
       write_inode_now+0x26e/0x2f0 fs/fs-writeback.c:2800
       ntfs_extend+0x3c2/0x4c0 fs/ntfs3/file.c:455
       ntfs_file_write_iter+0x2eb/0x540 fs/ntfs3/file.c:1138
       call_write_iter include/linux/fs.h:2174 [inline]
       new_sync_write fs/read_write.c:507 [inline]
       vfs_write+0xacd/0xe50 fs/read_write.c:594
       ksys_write+0x1a2/0x2c0 fs/read_write.c:647
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #0 (&ni->ni_lock){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788
       __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
       lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
       __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       ntfs_set_state+0x1fa/0x660 fs/ntfs3/fsntfs.c:925
       ni_remove_name+0x2bc/0x9a0 fs/ntfs3/frecord.c:2880
       ntfs_unlink_inode+0x3f5/0x760 fs/ntfs3/inode.c:1753
       ntfs_unlink+0x2f/0x50 fs/ntfs3/namei.c:184
       vfs_unlink+0x359/0x5f0 fs/namei.c:4280
       do_unlinkat+0x4a3/0x950 fs/namei.c:4348
       __do_sys_unlink fs/namei.c:4396 [inline]
       __se_sys_unlink fs/namei.c:4394 [inline]
       __x64_sys_unlink+0x45/0x50 fs/namei.c:4394
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

other info that might help us debug this:

 Possible unsafe locking scenario:

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

 *** DEADLOCK ***

5 locks held by syz-executor/4169:
 #0: ffff88801ff2c460 (sb_writers#14){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377
 #1: ffff888062de99c0 (&type->i_mutex_dir_key#8/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:824 [inline]
 #1: ffff888062de99c0 (&type->i_mutex_dir_key#8/1){+.+.}-{3:3}, at: do_unlinkat+0x266/0x950 fs/namei.c:4331
 #2: ffff888062deafe0 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:789 [inline]
 #2: ffff888062deafe0 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: vfs_unlink+0xe0/0x5f0 fs/namei.c:4269
 #3: ffff888062de9720 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1105 [inline]
 #3: ffff888062de9720 (&ni->ni_lock/5){+.+.}-{3:3}, at: ntfs_unlink+0x24/0x50 fs/ntfs3/namei.c:182
 #4: ffff888062dead40 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1100 [inline]
 #4: ffff888062dead40 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_unlink_inode+0x31d/0x760 fs/ntfs3/inode.c:1741

stack backtrace:
CPU: 1 PID: 4169 Comm: syz-executor Not tainted 5.15.170-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 check_noncircular+0x2f8/0x3b0 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788
 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 ntfs_set_state+0x1fa/0x660 fs/ntfs3/fsntfs.c:925
 ni_remove_name+0x2bc/0x9a0 fs/ntfs3/frecord.c:2880
 ntfs_unlink_inode+0x3f5/0x760 fs/ntfs3/inode.c:1753
 ntfs_unlink+0x2f/0x50 fs/ntfs3/namei.c:184
 vfs_unlink+0x359/0x5f0 fs/namei.c:4280
 do_unlinkat+0x4a3/0x950 fs/namei.c:4348
 __do_sys_unlink fs/namei.c:4396 [inline]
 __se_sys_unlink fs/namei.c:4394 [inline]
 __x64_sys_unlink+0x45/0x50 fs/namei.c:4394
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f4557f7ecc7
Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc411f36a8 EFLAGS: 00000206 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4557f7ecc7
RDX: 00007ffc411f36d0 RSI: 00007ffc411f3760 RDI: 00007ffc411f3760
RBP: 00007ffc411f3760 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffc411f4850
R13: 00007f4557ff223c R14: 00000000000105dc R15: 00007ffc411f5910
 </TASK>

Crashes (128):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/08 06:07 linux-5.15.y 72244eab0dad 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/11/06 03:39 linux-5.15.y 72244eab0dad 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/11/05 13:06 linux-5.15.y 72244eab0dad da38b4c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/11/05 13:06 linux-5.15.y 72244eab0dad da38b4c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/10/23 01:27 linux-5.15.y 74cdd62cb470 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/10/21 22:09 linux-5.15.y 584a40a22cb9 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/10/16 00:03 linux-5.15.y 3a5928702e71 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/10/15 00:09 linux-5.15.y 3a5928702e71 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/10/10 23:53 linux-5.15.y 3a5928702e71 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/10/03 19:18 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/09/28 20:52 linux-5.15.y 3a5928702e71 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/09/28 05:54 linux-5.15.y 3a5928702e71 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/09/25 16:17 linux-5.15.y 3a5928702e71 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/09/24 16:26 linux-5.15.y 3a5928702e71 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/09/23 18:53 linux-5.15.y 3a5928702e71 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/08/26 18:52 linux-5.15.y fa93fa65db6e 9aee4e0b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/08/22 11:13 linux-5.15.y fa93fa65db6e ca02180f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/08/21 10:14 linux-5.15.y fa93fa65db6e db5852f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/08/19 10:58 linux-5.15.y fa93fa65db6e 9f0ab3fb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/08/10 08:11 linux-5.15.y 7e89efd3ae1c 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/08/08 18:59 linux-5.15.y 7e89efd3ae1c 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/08/07 18:49 linux-5.15.y 7e89efd3ae1c 109d2082 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/08/06 17:23 linux-5.15.y 7e89efd3ae1c 1ef9fe42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/08/05 06:02 linux-5.15.y 7e89efd3ae1c 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2023/09/17 15:22 linux-5.15.y aff03380bda4 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in ntfs_set_state
2024/11/07 13:35 linux-5.15.y 72244eab0dad 867e44df .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/11/04 12:03 linux-5.15.y 72244eab0dad f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/11/04 09:49 linux-5.15.y 72244eab0dad f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/11/03 16:49 linux-5.15.y 72244eab0dad f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/10/22 23:09 linux-5.15.y 74cdd62cb470 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/10/22 15:33 linux-5.15.y 74cdd62cb470 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/10/20 19:20 linux-5.15.y 584a40a22cb9 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/10/10 16:42 linux-5.15.y 3a5928702e71 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/10/05 12:44 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/10/04 13:27 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/09/19 19:01 linux-5.15.y 3a5928702e71 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/09/16 22:24 linux-5.15.y 3a5928702e71 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/09/15 16:20 linux-5.15.y 3a5928702e71 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/09/03 11:51 linux-5.15.y fa93fa65db6e 326f9c5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/09/02 09:49 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/09/01 07:27 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/08/28 11:25 linux-5.15.y fa93fa65db6e 6c853ff9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/08/26 15:00 linux-5.15.y fa93fa65db6e 9aee4e0b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/08/23 11:53 linux-5.15.y fa93fa65db6e d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/08/21 20:51 linux-5.15.y fa93fa65db6e db5852f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/08/10 08:20 linux-5.15.y 7e89efd3ae1c 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2024/08/03 17:56 linux-5.15.y 7e89efd3ae1c 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2023/09/14 09:50 linux-5.15.y aff03380bda4 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
2023/09/12 02:23 linux-5.15.y aff03380bda4 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ntfs_set_state
* Struck through repros no longer work on HEAD.