syzbot


WARNING: nested lock was not taken in ntfs_fill_super

Status: upstream: reported syz repro on 2025/04/27 22:44
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+7c9108a48fe4bb58b147@syzkaller.appspotmail.com
First crash: 97d, last: 84d
Bug presence (1)
Date Name Commit Repro Result
2025/05/17 upstream (ToT) 5723cc3450bc C [report] KASAN: out-of-bounds Write in end_buffer_read_sync
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: nested lock was not taken in ntfs_fill_super ntfs3 4 syz done error 3 1000d 1033d 0/29 auto-obsoleted due to no activity on 2023/05/14 07:02
upstream WARNING: nested lock was not taken in ntfs_fill_super (2) ntfs3 4 1 578d 571d 0/29 auto-obsoleted due to no activity on 2024/04/02 07:26
upstream WARNING: nested lock was not taken in ntfs_fill_super (3) ntfs3 4 syz error error 3 227d 244d 0/29 auto-obsoleted due to no activity on 2025/06/14 10:19
Last patch testing requests (1)
Created Duration User Patch Repo Result
2025/05/26 08:27 18m retest repro linux-5.15.y report log

Sample crash report:
loop2: detected capacity change from 0 to 4096
ntfs3: loop2: Different NTFS' sector size (2048) and media sector size (512)
==================================
WARNING: Nested lock was not taken
5.15.182-syzkaller #0 Not tainted
----------------------------------
syz.2.184/4695 is trying to lock:
ffff888068e8b690 (&sb->s_type->i_lock_key#35){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline]
ffff888068e8b690 (&sb->s_type->i_lock_key#35){+.+.}-{2:2}, at: _atomic_dec_and_lock+0xa5/0x110 lib/dec_and_lock.c:28

but this task is not holding:
general protection fault, probably for non-canonical address 0xdffffc0020000002: 0000 [#1] PREEMPT SMP KASAN
KASAN: probably user-memory-access in range [0x0000000100000010-0x0000000100000017]
CPU: 1 PID: 4695 Comm: syz.2.184 Not tainted 5.15.182-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
RIP: 0010:print_lock_nested_lock_not_held kernel/locking/lockdep.c:4844 [inline]
RIP: 0010:__lock_acquire+0x11d4/0x7c60 kernel/locking/lockdep.c:5003
Code: 48 8b 9c 24 a8 00 00 00 74 12 48 89 df e8 d4 38 61 00 48 b9 00 00 00 00 00 fc ff df 48 8b 1b 48 83 c3 18 48 89 d8 48 c1 e8 03 <80> 3c 08 00 74 08 48 89 df e8 ae 38 61 00 48 8b 33 48 c7 c7 20 3b
RSP: 0018:ffffc90004f9f720 EFLAGS: 00010003
RAX: 0000000020000002 RBX: 0000000100000017 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000080000001 RDI: 0000000000000000
RBP: ffffc90004f9f970 R08: dffffc0000000000 R09: ffffed1017224f24
R10: ffffed1017224f24 R11: 1ffff11017224f23 R12: 000000000004092a
R13: ffff888022fc3b80 R14: ffff888022fc4698 R15: c5c99e871fce886c
FS:  00007efd49f576c0(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000020000001b000 CR3: 000000002370e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:363 [inline]
 _atomic_dec_and_lock+0xa5/0x110 lib/dec_and_lock.c:28
 iput+0x7e/0x8a0 fs/inode.c:1787
 ntfs_fill_super+0x355c/0x3c10 fs/ntfs3/super.c:1185
 get_tree_bdev+0x3f1/0x610 fs/super.c:1325
 vfs_get_tree+0x88/0x270 fs/super.c:1530
 do_new_mount+0x24a/0xa40 fs/namespace.c:3013
 do_mount fs/namespace.c:3356 [inline]
 __do_sys_mount fs/namespace.c:3564 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3541
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7efd4ace910a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 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:00007efd49f56e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007efd49f56ef0 RCX: 00007efd4ace910a
RDX: 000020000001f340 RSI: 0000200000000040 RDI: 00007efd49f56eb0
RBP: 000020000001f340 R08: 00007efd49f56ef0 R09: 0000000000000890
R10: 0000000000000890 R11: 0000000000000246 R12: 0000200000000040
R13: 00007efd49f56eb0 R14: 000000000001f331 R15: 0000200000000000
 </TASK>
Modules linked in:
---[ end trace f2091f24b08d7822 ]---
RIP: 0010:print_lock_nested_lock_not_held kernel/locking/lockdep.c:4844 [inline]
RIP: 0010:__lock_acquire+0x11d4/0x7c60 kernel/locking/lockdep.c:5003
Code: 48 8b 9c 24 a8 00 00 00 74 12 48 89 df e8 d4 38 61 00 48 b9 00 00 00 00 00 fc ff df 48 8b 1b 48 83 c3 18 48 89 d8 48 c1 e8 03 <80> 3c 08 00 74 08 48 89 df e8 ae 38 61 00 48 8b 33 48 c7 c7 20 3b
RSP: 0018:ffffc90004f9f720 EFLAGS: 00010003
RAX: 0000000020000002 RBX: 0000000100000017 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000080000001 RDI: 0000000000000000
RBP: ffffc90004f9f970 R08: dffffc0000000000 R09: ffffed1017224f24
R10: ffffed1017224f24 R11: 1ffff11017224f23 R12: 000000000004092a
R13: ffff888022fc3b80 R14: ffff888022fc4698 R15: c5c99e871fce886c
FS:  00007efd49f576c0(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000020000001b000 CR3: 000000002370e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	48 8b 9c 24 a8 00 00 	mov    0xa8(%rsp),%rbx
   7:	00
   8:	74 12                	je     0x1c
   a:	48 89 df             	mov    %rbx,%rdi
   d:	e8 d4 38 61 00       	call   0x6138e6
  12:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
  19:	fc ff df
  1c:	48 8b 1b             	mov    (%rbx),%rbx
  1f:	48 83 c3 18          	add    $0x18,%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 08 00          	cmpb   $0x0,(%rax,%rcx,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 ae 38 61 00       	call   0x6138e6
  38:	48 8b 33             	mov    (%rbx),%rsi
  3b:	48                   	rex.W
  3c:	c7                   	.byte 0xc7
  3d:	c7                   	(bad)
  3e:	20 3b                	and    %bh,(%rbx)

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/10 22:49 linux-5.15.y 3b8db0e4f263 77908e5f .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2 (corrupt fs)] ci2-linux-5-15-kasan WARNING: nested lock was not taken in ntfs_fill_super
2025/04/27 22:43 linux-5.15.y f7347f400572 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan WARNING: nested lock was not taken in ntfs_fill_super
* Struck through repros no longer work on HEAD.