syzbot


INFO: trying to register non-static key in ntfs3_setattr (2)

Status: upstream: reported C repro on 2024/09/19 09:32
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+2e842ec1beb075a25865@syzkaller.appspotmail.com
First crash: 97d, last: 79d
Cause bisection: introduced by (bisect log) :
commit 24c5100aceedcd47af89aaa404d4c96cd2837523
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Tue Jun 4 07:41:39 2024 +0000

  fs/ntfs3: Fix getting file type

Crash: INFO: trying to register non-static key in ntfs3_setattr (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 1fd21919de6de245b63066b8ee3cfba92e36f0e9
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Thu Aug 22 11:43:32 2024 +0000

  fs/ntfs3: Stale inode instead of bad

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ntfs3?] INFO: trying to register non-static key in ntfs3_setattr (2) 0 (2) 2024/11/05 09:01
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: trying to register non-static key in ntfs3_setattr ntfs3 1 622d 618d 0/28 auto-obsoleted due to no activity on 2023/08/07 04:20
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/12/12 14:59 19m retest repro upstream report log
2024/10/17 15:21 22m retest repro upstream OK log
2024/10/03 14:40 15m retest repro upstream report log

Sample crash report:
loop0: detected capacity change from 0 to 4096
ntfs3: loop0: ino=0, ntfs_iget5
ntfs3: loop0: Mark volume as dirty due to NTFS errors
ntfs3: loop0: failed to convert "046c" to maccroatian
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 UID: 0 PID: 5091 Comm: syz-executor407 Not tainted 6.11.0-syzkaller-05442-g932d2d1fcb2b #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:93 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
 assign_lock_key+0x241/0x280 kernel/locking/lockdep.c:981
 register_lock_class+0x1cf/0x980 kernel/locking/lockdep.c:1295
 __lock_acquire+0xf0/0x2050 kernel/locking/lockdep.c:5074
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822
 down_write+0x99/0x220 kernel/locking/rwsem.c:1579
 ntfs_truncate fs/ntfs3/file.c:457 [inline]
 ntfs3_setattr+0x6d3/0xb80 fs/ntfs3/file.c:774
 notify_change+0xbca/0xe90 fs/attr.c:503
 do_truncate+0x220/0x310 fs/open.c:65
 vfs_truncate+0x2e1/0x3b0 fs/open.c:111
 do_sys_truncate+0xdb/0x190 fs/open.c:134
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f65187b9b19
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 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:00007ffeb38726c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004c
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f65187b9b19
RDX: 00007f65187b9b19 RSI: 0000000000000000 RDI: 0000000020000000
RBP: 00007f651884c5f0 R08: 00005555644b84c0 R09: 00005555644b84c0
R10: 00005555644b84c0 R11: 0000000000000246 R12: 00007ffeb38726f0
R13: 00007ffeb3872918 R14: 431bde82d7b634db R15: 00007f651880203b
 </TASK>
------------[ cut here ]------------
DEBUG_RWSEMS_WARN_ON(sem->magic != sem): count = 0x1, magic = 0x0, owner = 0xffff88801efa4880, curr 0xffff88801efa4880, list not empty
WARNING: CPU: 0 PID: 5091 at kernel/locking/rwsem.c:1364 __up_write kernel/locking/rwsem.c:1364 [inline]
WARNING: CPU: 0 PID: 5091 at kernel/locking/rwsem.c:1364 up_write+0x412/0x590 kernel/locking/rwsem.c:1632
Modules linked in:
CPU: 0 UID: 0 PID: 5091 Comm: syz-executor407 Not tainted 6.11.0-syzkaller-05442-g932d2d1fcb2b #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:__up_write kernel/locking/rwsem.c:1364 [inline]
RIP: 0010:up_write+0x412/0x590 kernel/locking/rwsem.c:1632
Code: c7 c7 40 cc 0a 8c 48 c7 c6 20 ce 0a 8c 48 89 da 48 8b 4c 24 20 4c 8b 44 24 30 4c 8b 4c 24 28 50 e8 a3 90 e6 ff 48 83 c4 08 90 <0f> 0b 90 90 e9 b6 fc ff ff 90 0f 0b 90 e9 2a fd ff ff 48 89 5c 24
RSP: 0018:ffffc90002d6fa00 EFLAGS: 00010296
RAX: 0888a7481a94a700 RBX: 0000000000000001 RCX: ffff88801efa4880
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90002d6fad0 R08: ffffffff8155c052 R09: fffffbfff1cfa138
R10: dffffc0000000000 R11: fffffbfff1cfa138 R12: ffff888041327718
R13: ffff8880413276c0 R14: 1ffff920005adf48 R15: dffffc0000000000
FS:  00005555644b7380(0000) GS:ffff88801fe00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001000 CR3: 0000000012082000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ntfs_truncate fs/ntfs3/file.c:460 [inline]
 ntfs3_setattr+0x7b5/0xb80 fs/ntfs3/file.c:774
 notify_change+0xbca/0xe90 fs/attr.c:503
 do_truncate+0x220/0x310 fs/open.c:65
 vfs_truncate+0x2e1/0x3b0 fs/open.c:111
 do_sys_truncate+0xdb/0x190 fs/open.c:134
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f65187b9b19
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 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:00007ffeb38726c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004c
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f65187b9b19
RDX: 00007f65187b9b19 RSI: 0000000000000000 RDI: 0000000020000000
RBP: 00007f651884c5f0 R08: 00005555644b84c0 R09: 00005555644b84c0
R10: 00005555644b84c0 R11: 0000000000000246 R12: 00007ffeb38726f0
R13: 00007ffeb3872918 R14: 431bde82d7b634db R15: 00007f651880203b
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/19 14:37 upstream 932d2d1fcb2b 6f888b75 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root INFO: trying to register non-static key in ntfs3_setattr
2024/09/15 10:04 upstream 0babf683783d 08d8a733 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: trying to register non-static key in ntfs3_setattr
2024/09/15 09:22 upstream 0babf683783d 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in ntfs3_setattr
* Struck through repros no longer work on HEAD.