syzbot


BUG: unable to handle kernel NULL pointer dereference in rcu_core (3)

Status: upstream: reported syz repro on 2025/02/05 00:34
Subsystems: bcachefs rcu
[Documentation on labels]
Reported-by: syzbot+80e5d6f453f14a53383a@syzkaller.appspotmail.com
First crash: 105d, last: 73d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH 1/1] radix-tree: Prevent NULL pointer dereference in radix_tree_node_rcu_free 3 (3) 2025/02/25 18:44
[syzbot] [rcu?] [bcachefs?] BUG: unable to handle kernel NULL pointer dereference in rcu_core (3) 1 (2) 2025/02/05 14:56
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel NULL pointer dereference in rcu_core (2) arm 3 888d 903d 0/28 auto-obsoleted due to no activity on 2023/03/11 02:30
upstream BUG: unable to handle kernel NULL pointer dereference in rcu_core kernel 1 1903d 1899d 0/28 auto-closed as invalid on 2020/04/29 14:31
upstream general protection fault in rcu_core (2) reiserfs C done done 4 494d 709d 0/28 auto-obsoleted due to no activity on 2024/04/17 10:35
Last patch testing requests (6)
Created Duration User Patch Repo Result
2025/04/29 03:13 19m retest repro upstream OK log
2025/04/29 03:13 19m retest repro upstream OK log
2025/03/18 18:08 20m retest repro upstream OK log
2025/03/18 08:55 21m retest repro upstream OK log
2025/02/18 02:08 22m retest repro upstream report log
2025/02/18 02:08 24m retest repro upstream report log

Sample crash report:
 slab dentry start ffff88805af3f028 pointer offset 296 size 312
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 8000000032063067 P4D 8000000032063067 PUD 0 
Oops: Oops: 0010 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 41 Comm: kworker/0:1H Not tainted 6.14.0-rc5-syzkaller-00013-g99fa936e8e4f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: bcachefs_btree_read_complete btree_node_read_work
RIP: 0010:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0018:ffffc90000007bd8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff1100b5e7e2b RCX: bebb8a17c3375d00
RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff88805af3f150
RBP: ffffc90000007e10 R08: ffffffff81a114cc R09: 1ffffffff28a2908
R10: dffffc0000000000 R11: 0000000000000000 R12: ffffffff81a8d767
R13: ffff88805af3f158 R14: 0000000000000000 R15: ffff88805af3f150
FS:  0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000030756000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 rcu_do_batch kernel/rcu/tree.c:2546 [inline]
 rcu_core+0xaaa/0x17a0 kernel/rcu/tree.c:2802
 handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:561
 __do_softirq kernel/softirq.c:595 [inline]
 invoke_softirq kernel/softirq.c:435 [inline]
 __irq_exit_rcu+0xf7/0x220 kernel/softirq.c:662
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:preempt_schedule_irq+0xf6/0x1c0 kernel/sched/core.c:7087
Code: 89 f5 49 c1 ed 03 eb 0d 48 f7 03 08 00 00 00 0f 84 8b 00 00 00 bf 01 00 00 00 e8 b5 ae 8d f5 e8 80 d9 c7 f5 fb bf 01 00 00 00 <e8> 75 ab ff ff 43 80 7c 3d 00 00 74 08 4c 89 f7 e8 75 c1 24 f6 48
RSP: 0018:ffffc90000b16880 EFLAGS: 00000282
RAX: bebb8a17c3375d00 RBX: 1ffff92000162d18 RCX: ffffffff819d2a9a
RDX: dffffc0000000000 RSI: ffffffff8c2aa4a0 RDI: 0000000000000001
RBP: ffffc90000b16940 R08: ffffffff94514847 R09: 1ffffffff28a2908
R10: dffffc0000000000 R11: fffffbfff28a2909 R12: 1ffff92000162d10
R13: 1ffff92000162d14 R14: ffffc90000b168a0 R15: dffffc0000000000
 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354
 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
RIP: 0010:console_flush_all+0x996/0xeb0
Code: 48 21 c3 0f 85 16 02 00 00 e8 46 ee 20 00 4c 8b 7c 24 10 4d 85 f6 75 07 e8 37 ee 20 00 eb 06 e8 30 ee 20 00 fb 48 8b 5c 24 18 <48> 8b 44 24 30 42 80 3c 28 00 74 08 48 89 df e8 56 a2 85 00 4c 8b
RSP: 0018:ffffc90000b16a00 EFLAGS: 00000293
RAX: ffffffff81a0d090 RBX: ffffffff8f37a238 RCX: ffff888020e88000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000b16bb0 R08: ffffffff81a0d067 R09: 1ffffffff28a2908
R10: dffffc0000000000 R11: fffffbfff28a2909 R12: ffffffff8f37a1e0
R13: dffffc0000000000 R14: 0000000000000200 R15: ffffc90000b16c00
 __console_flush_and_unlock kernel/printk/printk.c:3269 [inline]
 console_unlock+0x14f/0x3b0 kernel/printk/printk.c:3309
 __bch2_fsck_err+0x1044/0x1420 fs/bcachefs/error.c:426
 __btree_err+0x64a/0x760 fs/bcachefs/btree_io.c:581
 validate_bset_keys+0x5df/0x1af0 fs/bcachefs/btree_io.c:926
 bch2_btree_node_read_done+0x2298/0x6180 fs/bcachefs/btree_io.c:1164
 btree_node_read_work+0x6dc/0x1380 fs/bcachefs/btree_io.c:1358
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319
 worker_thread+0x870/0xd30 kernel/workqueue.c:3400
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 0000000000000000 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0018:ffffc90000007bd8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff1100b5e7e2b RCX: bebb8a17c3375d00
RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff88805af3f150
RBP: ffffc90000007e10 R08: ffffffff81a114cc R09: 1ffffffff28a2908
R10: dffffc0000000000 R11: 0000000000000000 R12: ffffffff81a8d767
R13: ffff88805af3f158 R14: 0000000000000000 R15: ffff88805af3f150
FS:  0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000030756000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	89 f5                	mov    %esi,%ebp
   2:	49 c1 ed 03          	shr    $0x3,%r13
   6:	eb 0d                	jmp    0x15
   8:	48 f7 03 08 00 00 00 	testq  $0x8,(%rbx)
   f:	0f 84 8b 00 00 00    	je     0xa0
  15:	bf 01 00 00 00       	mov    $0x1,%edi
  1a:	e8 b5 ae 8d f5       	call   0xf58daed4
  1f:	e8 80 d9 c7 f5       	call   0xf5c7d9a4
  24:	fb                   	sti
  25:	bf 01 00 00 00       	mov    $0x1,%edi
* 2a:	e8 75 ab ff ff       	call   0xffffaba4 <-- trapping instruction
  2f:	43 80 7c 3d 00 00    	cmpb   $0x0,0x0(%r13,%r15,1)
  35:	74 08                	je     0x3f
  37:	4c 89 f7             	mov    %r14,%rdi
  3a:	e8 75 c1 24 f6       	call   0xf624c1b4
  3f:	48                   	rex.W

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/04 07:04 upstream 99fa936e8e4f c3901742 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs BUG: unable to handle kernel NULL pointer dereference in rcu_core
2025/03/01 08:03 upstream 276f98efb64a 67cf5345 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2 (corrupt fs)] ci-snapshot-upstream-root BUG: unable to handle kernel NULL pointer dereference in rcu_core
2025/02/04 02:07 upstream 0de63bb7d919 8f267cef .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root BUG: unable to handle kernel NULL pointer dereference in rcu_core
2025/02/01 00:26 upstream 69e858e0b8b2 aa47157c .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root BUG: unable to handle kernel NULL pointer dereference in rcu_core
* Struck through repros no longer work on HEAD.