syzbot


INFO: trying to register non-static key in txEnd

Status: fixed on 2024/03/20 11:33
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+ca4b16c6465dca321d40@syzkaller.appspotmail.com
Fix commit: 6f861765464f fs: Block writes to mounted block devices
First crash: 242d, last: 140d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: BUG: unable to handle kernel NULL pointer dereference in txBegin (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 6f861765464f43a71462d52026fbddfc858239a5
Author: Jan Kara <jack@suse.cz>
Date: Wed Nov 1 17:43:10 2023 +0000

  fs: Block writes to mounted block devices

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [jfs?] INFO: trying to register non-static key in txEnd 1 (3) 2024/03/07 09:25
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: trying to register non-static key in txEnd (2) jfs C done 153 4h42m 43d 0/26 upstream: reported C repro on 2024/04/13 09:52
linux-6.1 INFO: trying to register non-static key in txEnd origin:upstream C 9 6d13h 47d 0/3 upstream: reported C repro on 2024/04/09 08:39
linux-5.15 INFO: trying to register non-static key in txEnd origin:upstream C 4 14d 16d 0/3 upstream: reported C repro on 2024/05/09 20:23
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/01/29 15:33 48m retest repro upstream OK log
2024/01/22 10:08 46m retest repro upstream OK log
2023/10/15 08:31 14m retest repro upstream report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/03/03 09:26 5h55m bisect fix upstream job log (1)
2023/11/18 14:48 2h04m bisect fix upstream job log (0) log

Sample crash report:
=======================================================
ERROR: (device loop0): txBegin: read-only filesystem
ERROR: (device loop0): remounting filesystem as read-only
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 PID: 5063 Comm: syz-executor334 Not tainted 6.7.0-rc5-syzkaller-00125-gc7402612e2e6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 assign_lock_key kernel/locking/lockdep.c:976 [inline]
 register_lock_class+0xc1e/0x1220 kernel/locking/lockdep.c:1289
 __lock_acquire+0x112/0x3b20 kernel/locking/lockdep.c:5014
 lock_acquire kernel/locking/lockdep.c:5754 [inline]
 lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:162
 __wake_up_common_lock kernel/sched/wait.c:105 [inline]
 __wake_up+0x1c/0x50 kernel/sched/wait.c:127
 txEnd+0x98/0x5a0 fs/jfs/jfs_txnmgr.c:504
 __jfs_xattr_set+0xe3/0x150 fs/jfs/xattr.c:920
 __vfs_setxattr+0x173/0x1d0 fs/xattr.c:201
 __vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:235
 __vfs_setxattr_locked+0x17e/0x250 fs/xattr.c:296
 vfs_setxattr+0x146/0x350 fs/xattr.c:322
 do_setxattr+0x142/0x170 fs/xattr.c:630
 setxattr+0x159/0x170 fs/xattr.c:653
 path_setxattr+0x175/0x1d0 fs/xattr.c:672
 __do_sys_setxattr fs/xattr.c:688 [inline]
 __se_sys_setxattr fs/xattr.c:684 [inline]
 __x64_sys_setxattr+0xc4/0x160 fs/xattr.c:684
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f65bdb1de29
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:00007ffd720669c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f65bdb1de29
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000020000180
RBP: 00007f65bdb67082 R08: 0000000000000002 R09: 0000555556e7c4c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd720669f0
R13: 00007ffd72066c18 R14: 431bde82d7b634db R15: 00007f65bdb6703b
 </TASK>
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 5063 Comm: syz-executor334 Not tainted 6.7.0-rc5-syzkaller-00125-gc7402612e2e6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:__wake_up_common+0x9a/0x1d0 kernel/sched/wait.c:85
Code: 02 00 0f 85 46 01 00 00 48 8b 5b 40 48 8d 43 e8 4c 39 fb 0f 84 a4 00 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 d9 48 c1 e9 03 <80> 3c 11 00 0f 85 03 01 00 00 49 bc 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc900033c7840 EFLAGS: 00010046
RAX: ffffffffffffffe8 RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000003 RDI: ffffc900025b8030
RBP: 0000000000000000 R08: 0000000000000000 R09: fffff52000678eff
R10: 0000000000000003 R11: 0000000000000001 R12: 0000000000000003
R13: 0000000000000246 R14: 0000000000000000 R15: ffffc900025b8070
FS:  0000555556e7b380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001c37538 CR3: 000000007ed68000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __wake_up_common_lock kernel/sched/wait.c:106 [inline]
 __wake_up+0x31/0x50 kernel/sched/wait.c:127
 txEnd+0x98/0x5a0 fs/jfs/jfs_txnmgr.c:504
 __jfs_xattr_set+0xe3/0x150 fs/jfs/xattr.c:920
 __vfs_setxattr+0x173/0x1d0 fs/xattr.c:201
 __vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:235
 __vfs_setxattr_locked+0x17e/0x250 fs/xattr.c:296
 vfs_setxattr+0x146/0x350 fs/xattr.c:322
 do_setxattr+0x142/0x170 fs/xattr.c:630
 setxattr+0x159/0x170 fs/xattr.c:653
 path_setxattr+0x175/0x1d0 fs/xattr.c:672
 __do_sys_setxattr fs/xattr.c:688 [inline]
 __se_sys_setxattr fs/xattr.c:684 [inline]
 __x64_sys_setxattr+0xc4/0x160 fs/xattr.c:684
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f65bdb1de29
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:00007ffd720669c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f65bdb1de29
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000020000180
RBP: 00007f65bdb67082 R08: 0000000000000002 R09: 0000555556e7c4c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd720669f0
R13: 00007ffd72066c18 R14: 431bde82d7b634db R15: 00007f65bdb6703b
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__wake_up_common+0x9a/0x1d0 kernel/sched/wait.c:85
Code: 02 00 0f 85 46 01 00 00 48 8b 5b 40 48 8d 43 e8 4c 39 fb 0f 84 a4 00 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 d9 48 c1 e9 03 <80> 3c 11 00 0f 85 03 01 00 00 49 bc 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc900033c7840 EFLAGS: 00010046
RAX: ffffffffffffffe8 RBX: 0000000000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000003 RDI: ffffc900025b8030
RBP: 0000000000000000 R08: 0000000000000000 R09: fffff52000678eff
R10: 0000000000000003 R11: 0000000000000001 R12: 0000000000000003
R13: 0000000000000246 R14: 0000000000000000 R15: ffffc900025b8070
FS:  0000555556e7b380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001c37538 CR3: 000000007ed68000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	02 00                	add    (%rax),%al
   2:	0f 85 46 01 00 00    	jne    0x14e
   8:	48 8b 5b 40          	mov    0x40(%rbx),%rbx
   c:	48 8d 43 e8          	lea    -0x18(%rbx),%rax
  10:	4c 39 fb             	cmp    %r15,%rbx
  13:	0f 84 a4 00 00 00    	je     0xbd
  19:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
  20:	fc ff df
  23:	48 89 d9             	mov    %rbx,%rcx
  26:	48 c1 e9 03          	shr    $0x3,%rcx
* 2a:	80 3c 11 00          	cmpb   $0x0,(%rcx,%rdx,1) <-- trapping instruction
  2e:	0f 85 03 01 00 00    	jne    0x137
  34:	49 bc 00 00 00 00 00 	movabs $0xdffffc0000000000,%r12
  3b:	fc ff df
  3e:	4c                   	rex.WR
  3f:	8b                   	.byte 0x8b

Crashes (20):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/15 12:38 upstream c7402612e2e6 3222d10c .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root INFO: trying to register non-static key in txEnd
2023/10/01 08:18 upstream 3b517966c561 8e26a358 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root INFO: trying to register non-static key in txEnd
2024/01/07 07:03 upstream 52b1853b080a d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/28 13:16 upstream f5837722ffec fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: trying to register non-static key in txEnd
2023/12/28 13:01 upstream f5837722ffec fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: trying to register non-static key in txEnd
2023/12/28 12:37 upstream f5837722ffec fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/27 09:30 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/25 16:41 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: trying to register non-static key in txEnd
2023/12/24 01:23 upstream 3f82f1c3a036 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/21 14:15 upstream a4aebe936554 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/20 08:48 upstream 55cb5f43689d 3ad490ea .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/20 04:27 upstream 55cb5f43689d 3ad490ea .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/18 03:45 upstream 0e389834672c 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/13 03:58 upstream eaadbbaaff74 ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/13 00:00 upstream eaadbbaaff74 ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/11 23:14 upstream a39b6ac3781d 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/11 18:17 upstream a39b6ac3781d 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/05 11:22 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/12/01 12:31 upstream e8f60209d6cf f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: trying to register non-static key in txEnd
2023/09/27 14:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bf6547d8715b 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: trying to register non-static key in txEnd
* Struck through repros no longer work on HEAD.