syzbot


general protection fault in btree_node_write_endio

Status: moderation: reported on 2025/04/21 03:53
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+176ea6e00826360bd5c6@syzkaller.appspotmail.com
First crash: 5d14h, last: 5d14h

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xe01ffbf110170c75: 0000 [#1] SMP KASAN PTI
KASAN: maybe wild-memory-access in range [0x00ffff8880b863a8-0x00ffff8880b863af]
CPU: 0 UID: 0 PID: 62 Comm: kworker/u8:4 Not tainted 6.15.0-rc2-syzkaller-00048-gc62f4b82d571 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: events_unbound nsim_dev_trap_report_work
RIP: 0010:kasan_byte_accessible+0x12/0x20 mm/kasan/generic.c:199
Code: 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 48 c1 ef 03 48 b8 00 00 00 00 00 fc ff df <0f> b6 04 07 3c 08 0f 92 c0 c3 cc cc cc cc 90 90 90 90 90 90 90 90
RSP: 0018:ffffc900000079f0 EFLAGS: 00010003
RAX: dffffc0000000000 RBX: 00ffff8880b863ad RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8c2b7dde RDI: 001ffff110170c75
RBP: ffffffff93657020 R08: 0000000000000001 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed100682c451 R12: 0000000000000001
R13: 0000000000000000 R14: ffffffff8c2b7dde R15: 00ffff8880b863ad
FS:  0000000000000000(0000) GS:ffff888124fc9000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b30214ff8 CR3: 0000000034ec8000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 __kasan_check_byte+0x14/0x40 mm/kasan/common.c:556
 kasan_check_byte include/linux/kasan.h:399 [inline]
 lock_acquire+0x89/0x2f0 kernel/locking/lockdep.c:5840
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
 __queue_work+0x785/0x10a0 kernel/workqueue.c:-1
 queue_work_on+0x1c4/0x380 kernel/workqueue.c:2392
 queue_work include/linux/workqueue.h:662 [inline]
 btree_node_write_endio+0x840/0xa90 fs/bcachefs/btree_io.c:2180
 blk_update_request+0x5e5/0x1160 block/blk-mq.c:983
 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1145
 blk_complete_reqs block/blk-mq.c:1220 [inline]
 blk_done_softirq+0x100/0x150 block/blk-mq.c:1225
 handle_softirqs+0x2d6/0x9b0 kernel/softirq.c:579
 do_softirq+0x11f/0x1e0 kernel/softirq.c:480
 </IRQ>
 <TASK>
 __local_bh_enable_ip+0x1be/0x200 kernel/softirq.c:407
 spin_unlock_bh include/linux/spinlock.h:396 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:820 [inline]
 nsim_dev_trap_report_work+0x7c9/0xb50 drivers/net/netdevsim/dev.c:851
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0xac3/0x18e0 kernel/workqueue.c:3319
 worker_thread+0x870/0xd50 kernel/workqueue.c:3400
 kthread+0x7b7/0x940 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:kasan_byte_accessible+0x12/0x20 mm/kasan/generic.c:199
Code: 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 48 c1 ef 03 48 b8 00 00 00 00 00 fc ff df <0f> b6 04 07 3c 08 0f 92 c0 c3 cc cc cc cc 90 90 90 90 90 90 90 90
RSP: 0018:ffffc900000079f0 EFLAGS: 00010003

RAX: dffffc0000000000 RBX: 00ffff8880b863ad RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8c2b7dde RDI: 001ffff110170c75
RBP: ffffffff93657020 R08: 0000000000000001 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed100682c451 R12: 0000000000000001
R13: 0000000000000000 R14: ffffffff8c2b7dde R15: 00ffff8880b863ad
FS:  0000000000000000(0000) GS:ffff888124fc9000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b30214ff8 CR3: 0000000034ec8000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
   7:	00
   8:	90                   	nop
   9:	90                   	nop
   a:	90                   	nop
   b:	90                   	nop
   c:	90                   	nop
   d:	90                   	nop
   e:	90                   	nop
   f:	90                   	nop
  10:	90                   	nop
  11:	90                   	nop
  12:	90                   	nop
  13:	90                   	nop
  14:	90                   	nop
  15:	90                   	nop
  16:	90                   	nop
  17:	90                   	nop
  18:	66 0f 1f 00          	nopw   (%rax)
  1c:	48 c1 ef 03          	shr    $0x3,%rdi
  20:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  27:	fc ff df
* 2a:	0f b6 04 07          	movzbl (%rdi,%rax,1),%eax <-- trapping instruction
  2e:	3c 08                	cmp    $0x8,%al
  30:	0f 92 c0             	setb   %al
  33:	c3                   	ret
  34:	cc                   	int3
  35:	cc                   	int3
  36:	cc                   	int3
  37:	cc                   	int3
  38:	90                   	nop
  39:	90                   	nop
  3a:	90                   	nop
  3b:	90                   	nop
  3c:	90                   	nop
  3d:	90                   	nop
  3e:	90                   	nop
  3f:	90                   	nop

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/17 03:45 upstream c62f4b82d571 a95239b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in btree_node_write_endio
* Struck through repros no longer work on HEAD.