syzbot


general protection fault in closure_put_after_sub (3)

Status: moderation: reported on 2025/04/01 20:05
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+8b760fe021b2b548c810@syzkaller.appspotmail.com
First crash: 28d, last: 28d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in closure_put_after_sub (2) bcachefs 1 143d 143d 0/28 auto-obsoleted due to no activity on 2025/03/13 14:02
upstream general protection fault in closure_put_after_sub bcachefs 1 319d 315d 0/28 auto-obsoleted due to no activity on 2024/09/08 13:52

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xed001bfff1100364: 0000 [#1] SMP KASAN PTI
KASAN: maybe wild-memory-access in range [0x6800ffff88801b20-0x6800ffff88801b27]
CPU: 0 UID: 0 PID: 42 Comm: kworker/0:1H Not tainted 6.14.0-syzkaller-07422-gacb4f33713b9 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: bcachefs_btree_io btree_node_write_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:ffffc90000b375d0 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 6800ffff88801b22 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8c1fd56e RDI: 0d001ffff1100364
RBP: ffffffff935f9020 R08: 0000000000000001 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed100f473401 R12: 0000000000000001
R13: 0000000000000000 R14: ffffffff8c1fd56e R15: 6800ffff88801b22
FS:  0000000000000000(0000) GS:ffff888125027000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110f27eb87 CR3: 000000006001e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __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]
 closure_queue include/linux/closure.h:268 [inline]
 closure_put_after_sub+0x2b1/0x330 lib/closure.c:42
 bch2_btree_complete_write fs/bcachefs/btree_io.c:2019 [inline]
 __btree_node_write_done+0x258/0x460 fs/bcachefs/btree_io.c:2030
 btree_node_write_done fs/bcachefs/btree_io.c:2073 [inline]
 btree_node_write_work+0xacb/0xcc0 fs/bcachefs/btree_io.c:2116
 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:ffffc90000b375d0 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 6800ffff88801b22 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8c1fd56e RDI: 0d001ffff1100364
RBP: ffffffff935f9020 R08: 0000000000000001 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed100f473401 R12: 0000000000000001
R13: 0000000000000000 R14: ffffffff8c1fd56e R15: 6800ffff88801b22
FS:  0000000000000000(0000) GS:ffff888125027000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110f27eb87 CR3: 000000006001e000 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/03/28 19:53 upstream acb4f33713b9 9a1a9e31 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in closure_put_after_sub
* Struck through repros no longer work on HEAD.