syzbot


WARNING: nested lock was not taken in ntfs_fill_super (3)

Status: upstream: reported syz repro on 2024/12/02 12:54
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+a86ba8468e1f414dce00@syzkaller.appspotmail.com
First crash: 49d, last: 1d23h
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ntfs3?] WARNING: nested lock was not taken in ntfs_fill_super (3) 0 (1) 2024/12/02 12:54
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: nested lock was not taken in ntfs_fill_super ntfs3 syz done error 3 774d 808d 0/28 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 1 353d 346d 0/28 auto-obsoleted due to no activity on 2024/04/02 07:26
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/12/16 16:13 23m retest repro upstream report log

Sample crash report:
ntfs3(loop0): Different NTFS sector size (2048) and media sector size (512).
==================================
WARNING: Nested lock was not taken
6.13.0-rc1-syzkaller #0 Not tainted
----------------------------------
syz.0.167/6410 is trying to lock:
ffff88805d36f110 (&sb->s_type->i_lock_key#34){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff88805d36f110 (&sb->s_type->i_lock_key#34){+.+.}-{3:3}, at: iput_final fs/inode.c:1935 [inline]
ffff88805d36f110 (&sb->s_type->i_lock_key#34){+.+.}-{3:3}, at: iput fs/inode.c:1972 [inline]
ffff88805d36f110 (&sb->s_type->i_lock_key#34){+.+.}-{3:3}, at: iput+0x63e/0x890 fs/inode.c:1958

but this task is not holding:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
CPU: 0 UID: 0 PID: 6410 Comm: syz.0.167 Not tainted 6.13.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:print_lock_nested_lock_not_held kernel/locking/lockdep.c:5049 [inline]
RIP: 0010:__lock_acquire+0x1241/0x3c40 kernel/locking/lockdep.c:5217
Code: fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 08 21 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5f 18 48 8d 7b 18 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 db 20 00 00 48 8b 73 18 48 c7 c7 20 0c 6d 8b e8
RSP: 0018:ffffc9000524f820 EFLAGS: 00010016
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff81794fa9
RDX: 0000000000000003 RSI: ffffffff8179f976 RDI: 0000000000000018
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000002 R11: 7369687420747562 R12: ffff888025af8000
R13: ffff888025af8000 R14: ffffed1004b5f15b R15: ffff888025af8b08
FS:  00007f4e610c96c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555577de8608 CR3: 000000005eac8000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5849
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:351 [inline]
 iput_final fs/inode.c:1935 [inline]
 iput fs/inode.c:1972 [inline]
 iput+0x63e/0x890 fs/inode.c:1958
 ntfs_fill_super+0x331c/0x4190 fs/ntfs3/super.c:1472
 get_tree_bdev_flags+0x38e/0x620 fs/super.c:1636
 vfs_get_tree+0x92/0x380 fs/super.c:1814
 do_new_mount fs/namespace.c:3507 [inline]
 path_mount+0x14e6/0x1f20 fs/namespace.c:3834
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4057 [inline]
 __se_sys_mount fs/namespace.c:4034 [inline]
 __x64_sys_mount+0x294/0x320 fs/namespace.c:4034
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4e60381fea
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:00007f4e610c8e88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f4e610c8f10 RCX: 00007f4e60381fea
RDX: 00000000200000c0 RSI: 000000002001f3c0 RDI: 00007f4e610c8ed0
RBP: 00000000200000c0 R08: 00007f4e610c8f10 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000002001f3c0
R13: 00007f4e610c8ed0 R14: 000000000001f393 R15: 00000000200001c0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:print_lock_nested_lock_not_held kernel/locking/lockdep.c:5049 [inline]
RIP: 0010:__lock_acquire+0x1241/0x3c40 kernel/locking/lockdep.c:5217
Code: fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 08 21 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5f 18 48 8d 7b 18 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 db 20 00 00 48 8b 73 18 48 c7 c7 20 0c 6d 8b e8
RSP: 0018:ffffc9000524f820 EFLAGS: 00010016
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff81794fa9
RDX: 0000000000000003 RSI: ffffffff8179f976 RDI: 0000000000000018
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000002 R11: 7369687420747562 R12: ffff888025af8000
R13: ffff888025af8000 R14: ffffed1004b5f15b R15: ffff888025af8b08
FS:  00007f4e610c96c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555577de8608 CR3: 000000005eac8000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess), 3 bytes skipped:
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 08 21 00 00    	jne    0x2116
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	49 8b 5f 18          	mov    0x18(%r15),%rbx
  1c:	48 8d 7b 18          	lea    0x18(%rbx),%rdi
  20:	48 89 fa             	mov    %rdi,%rdx
  23:	48 c1 ea 03          	shr    $0x3,%rdx
* 27:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2b:	0f 85 db 20 00 00    	jne    0x210c
  31:	48 8b 73 18          	mov    0x18(%rbx),%rsi
  35:	48 c7 c7 20 0c 6d 8b 	mov    $0xffffffff8b6d0c20,%rdi
  3c:	e8                   	.byte 0xe8

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/02 12:53 upstream 40384c840ea1 68914665 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-badwrites-root WARNING: nested lock was not taken in ntfs_fill_super
2024/12/19 15:15 upstream eabcdba3ad40 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING: nested lock was not taken in ntfs_fill_super
2024/11/02 06:42 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING: nested lock was not taken in ntfs_fill_super
* Struck through repros no longer work on HEAD.