syzbot


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

Status: upstream: reported C repro on 2024/04/01 16:51
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+6783b9aaa6a224fabde8@syzkaller.appspotmail.com
First crash: 418d, last: 11d
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 do_mpage_readpage (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 do_mpage_readpage (2) 0 (3) 2024/11/07 11:24
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: trying to register non-static key in do_mpage_readpage ntfs3 C error done 24 521d 875d 25/28 fixed on 2024/01/30 15:47
Last patch testing requests (6)
Created Duration User Patch Repo Result
2025/05/11 12:30 14m retest repro upstream report log
2024/12/11 02:41 18m retest repro upstream OK log
2024/10/20 08:18 20m retest repro upstream OK log
2024/10/02 02:28 12m retest repro upstream report log
2024/06/22 08:58 18m retest repro upstream report log
2024/04/13 08:31 15m retest repro upstream report log

Sample crash report:
loop0: detected capacity change from 0 to 4096
ntfs3(loop0): ino=0, "file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ni_find_attr
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: 1 UID: 0 PID: 5814 Comm: syz-executor301 Not tainted 6.15.0-rc3-syzkaller-00342-g5bc1018675ec #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 assign_lock_key+0x133/0x150 kernel/locking/lockdep.c:986
 register_lock_class+0x105/0x320 kernel/locking/lockdep.c:1300
 __lock_acquire+0x7f/0xd20 kernel/locking/lockdep.c:5110
 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5866
 down_read+0x46/0x2e0 kernel/locking/rwsem.c:1524
 attr_data_get_block+0x10f/0x1ec0 fs/ntfs3/attrib.c:906
 ntfs_get_block_vbo+0x392/0xc30 fs/ntfs3/inode.c:605
 do_mpage_readpage+0x86d/0x19a0 fs/mpage.c:222
 mpage_readahead+0x398/0x650 fs/mpage.c:371
 read_pages+0x177/0x590 mm/readahead.c:160
 page_cache_ra_unbounded+0x6b0/0x7b0 mm/readahead.c:297
 filemap_get_pages+0x43c/0x1eb0 mm/filemap.c:2591
 filemap_read+0x3fa/0x11d0 mm/filemap.c:2702
 __kernel_read+0x469/0x8c0 fs/read_write.c:528
 integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28
 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:480 [inline]
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:511 [inline]
 ima_calc_file_hash+0x152c/0x18d0 security/integrity/ima/ima_crypto.c:568
 ima_collect_measurement+0x42e/0x8e0 security/integrity/ima/ima_api.c:293
 process_measurement+0x1121/0x1a40 security/integrity/ima/ima_main.c:385
 ima_file_check+0xd7/0x120 security/integrity/ima/ima_main.c:613
 security_file_post_open+0xbb/0x290 security/security.c:3130
 do_open fs/namei.c:3882 [inline]
 path_openat+0x2f26/0x3830 fs/namei.c:4039
 do_file_open_root+0x304/0x5a0 fs/namei.c:4091
 file_open_root+0x15d/0x1b0 fs/open.c:1408
 do_handle_open+0x7a9/0x840 fs/fhandle.c:415
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7713398739
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:00007ffc11fb72a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000130
RAX: ffffffffffffffda RBX: 0000200000000080 RCX: 00007f7713398739
RDX: 0000000000000000 RSI: 00002000000000c0 RDI: 00000000ffffff9c
RBP: 00002000000000c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000000
R13: 00007ffc11fb7488 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
------------[ cut here ]------------
DEBUG_RWSEMS_WARN_ON(sem->magic != sem): count = 0x100, magic = 0x0, owner = 0xffff88802e075a01, curr 0xffff88802e075a00, list not empty
WARNING: CPU: 1 PID: 5814 at kernel/locking/rwsem.c:1340 __up_read+0x4f8/0x680 kernel/locking/rwsem.c:1340
Modules linked in:
CPU: 1 UID: 0 PID: 5814 Comm: syz-executor301 Not tainted 6.15.0-rc3-syzkaller-00342-g5bc1018675ec #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
RIP: 0010:__up_read+0x4f8/0x680 kernel/locking/rwsem.c:1340
Code: c7 c7 80 d5 6a 8b 48 c7 c6 e0 d6 6a 8b 4c 89 ea 48 8b 4c 24 08 4c 8b 04 24 4c 8b 4c 24 10 41 52 e8 fd 7b e6 ff 48 83 c4 08 90 <0f> 0b 90 90 e9 c7 fb ff ff c6 05 53 fd c9 0d 01 90 48 89 df be 08
RSP: 0018:ffffc90003e9dd80 EFLAGS: 00010292
RAX: 4116208e113fc300 RBX: ffff8880740a76c0 RCX: ffff88802e075a00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000002
RBP: ffffc90003e9de30 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff1bba4b4 R12: ffff8880740a7728
R13: 0000000000000100 R14: 1ffff1100e814ee5 R15: ffff8880740a7718
FS:  000055556f6dc380(0000) GS:ffff888126202000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000001240 CR3: 000000007f6cc000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 attr_data_get_block+0x175/0x1ec0 fs/ntfs3/attrib.c:909
 ntfs_get_block_vbo+0x392/0xc30 fs/ntfs3/inode.c:605
 do_mpage_readpage+0x86d/0x19a0 fs/mpage.c:222
 mpage_readahead+0x398/0x650 fs/mpage.c:371
 read_pages+0x177/0x590 mm/readahead.c:160
 page_cache_ra_unbounded+0x6b0/0x7b0 mm/readahead.c:297
 filemap_get_pages+0x43c/0x1eb0 mm/filemap.c:2591
 filemap_read+0x3fa/0x11d0 mm/filemap.c:2702
 __kernel_read+0x469/0x8c0 fs/read_write.c:528
 integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28
 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:480 [inline]
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:511 [inline]
 ima_calc_file_hash+0x152c/0x18d0 security/integrity/ima/ima_crypto.c:568
 ima_collect_measurement+0x42e/0x8e0 security/integrity/ima/ima_api.c:293
 process_measurement+0x1121/0x1a40 security/integrity/ima/ima_main.c:385
 ima_file_check+0xd7/0x120 security/integrity/ima/ima_main.c:613
 security_file_post_open+0xbb/0x290 security/security.c:3130
 do_open fs/namei.c:3882 [inline]
 path_openat+0x2f26/0x3830 fs/namei.c:4039
 do_file_open_root+0x304/0x5a0 fs/namei.c:4091
 file_open_root+0x15d/0x1b0 fs/open.c:1408
 do_handle_open+0x7a9/0x840 fs/fhandle.c:415
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7713398739
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:00007ffc11fb72a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000130
RAX: ffffffffffffffda RBX: 0000200000000080 RCX: 00007f7713398739
RDX: 0000000000000000 RSI: 00002000000000c0 RDI: 00000000ffffff9c
RBP: 00002000000000c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000000
R13: 00007ffc11fb7488 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/27 01:31 upstream 5bc1018675ec c6b4fb39 .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 do_mpage_readpage
2025/04/27 00:10 upstream 5bc1018675ec c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/10/06 03:49 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/18 02:27 upstream 2f27fce67173 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/17 23:39 upstream 2f27fce67173 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/16 09:38 upstream 98f7e32f20d2 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/15 13:48 upstream d42f7708e27c 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/13 13:58 upstream fdf042df0463 73e8a465 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/12 16:41 upstream 77f587896757 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/11 15:29 upstream 8d8d276ba2fb 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/11 13:13 upstream 8d8d276ba2fb 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/07 18:33 upstream b31c44928842 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/09/01 08:45 upstream e8784b0aef62 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2024/08/29 22:30 upstream d5d547aa7b51 9bd464fc .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 do_mpage_readpage
2024/08/29 21:46 upstream d5d547aa7b51 9bd464fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in do_mpage_readpage
2025/01/25 13:41 upstream b46c89c08f41 9fbd772e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root INFO: trying to register non-static key in do_mpage_readpage
2025/01/13 08:01 upstream be548645527a 6dbc6a9b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root INFO: trying to register non-static key in do_mpage_readpage
2024/03/30 08:28 upstream 4535e1a4174c 6baf5069 .config console log report syz C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-qemu-upstream INFO: trying to register non-static key in do_mpage_readpage
* Struck through repros no longer work on HEAD.