syzbot


general protection fault in bch2_opts_apply

Status: upstream: reported syz repro on 2024/07/16 03:25
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+c55b814203b2ecab10bb@syzkaller.appspotmail.com
First crash: 138d, last: 64d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit bf4baaa087e2be0279991f1dbf9acaa7a4c9148c
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Sat Oct 5 21:37:02 2024 +0000

  bcachefs: Fix lockdep splat in bch2_accounting_read

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] general protection fault in bch2_opts_apply 0 (2) 2024/10/22 23:54
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/07/30 09:56 21m retest repro upstream OK log
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2024/10/22 14:02 9h50m bisect fix upstream OK (1) job log
2024/09/17 10:00 2h40m bisect fix upstream OK (0) job log log
2024/08/18 07:36 2h23m bisect fix upstream OK (0) job log log

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc00000000ea: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000750-0x0000000000000757]
CPU: 0 PID: 5957 Comm: syz.0.90 Not tainted 6.10.0-syzkaller-00017-g5e0497553643 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:bch2_opts_apply+0x175/0x4710 fs/bcachefs/opts.c:179
Code: c0 0f 85 88 28 00 00 44 89 3b 48 8d 5c 24 40 41 f6 c6 04 0f 84 5d 19 00 00 e8 b7 23 5d fd 4d 8d 7c 24 08 4c 89 e0 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 75 28 00 00 4c 89 f8 48 c1 e8 03 42 0f
RSP: 0018:ffffc900032d7820 EFLAGS: 00010212
RAX: 00000000000000ea RBX: ffffc900032d7860 RCX: ffff88802046da00
RDX: 0000000000000000 RSI: ffffc900032d7a40 RDI: ffffc900032d7900
RBP: ffffc900032d7990 R08: ffffffff8427ea52 R09: 1ffffffff1f5b2ad
R10: dffffc0000000000 R11: fffffbfff1f5b2ae R12: 0000000000000751
R13: dffffc0000000000 R14: 0080000000000004 R15: 0000000000000759
FS:  000055557be6c500(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0c3ffff000 CR3: 000000002bf8e000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 bch2_mount+0x774/0x13c0 fs/bcachefs/fs.c:1946
 legacy_get_tree+0xf0/0x190 fs/fs_context.c:662
 vfs_get_tree+0x92/0x2a0 fs/super.c:1789
 do_new_mount+0x2be/0xb40 fs/namespace.c:3352
 do_mount fs/namespace.c:3692 [inline]
 __do_sys_mount fs/namespace.c:3898 [inline]
 __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1cb79772da
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 7e 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff0b6bb668 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff0b6bb6f0 RCX: 00007f1cb79772da
RDX: 0000000020000000 RSI: 0000000020000040 RDI: 00007fff0b6bb6b0
RBP: 0000000020000000 R08: 00007fff0b6bb6f0 R09: 0000000000000010
R10: 0000000000000010 R11: 0000000000000246 R12: 0000000020000040
R13: 00007fff0b6bb6b0 R14: 0000000000005ba5 R15: 00000000200000c0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_opts_apply+0x175/0x4710 fs/bcachefs/opts.c:179
Code: c0 0f 85 88 28 00 00 44 89 3b 48 8d 5c 24 40 41 f6 c6 04 0f 84 5d 19 00 00 e8 b7 23 5d fd 4d 8d 7c 24 08 4c 89 e0 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 75 28 00 00 4c 89 f8 48 c1 e8 03 42 0f
RSP: 0018:ffffc900032d7820 EFLAGS: 00010212
RAX: 00000000000000ea RBX: ffffc900032d7860 RCX: ffff88802046da00
RDX: 0000000000000000 RSI: ffffc900032d7a40 RDI: ffffc900032d7900
RBP: ffffc900032d7990 R08: ffffffff8427ea52 R09: 1ffffffff1f5b2ad
R10: dffffc0000000000 R11: fffffbfff1f5b2ae R12: 0000000000000751
R13: dffffc0000000000 R14: 0080000000000004 R15: 0000000000000759
FS:  000055557be6c500(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff710d25000 CR3: 000000002bf8e000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
   0:	c0 0f 85             	rorb   $0x85,(%rdi)
   3:	88 28                	mov    %ch,(%rax)
   5:	00 00                	add    %al,(%rax)
   7:	44 89 3b             	mov    %r15d,(%rbx)
   a:	48 8d 5c 24 40       	lea    0x40(%rsp),%rbx
   f:	41 f6 c6 04          	test   $0x4,%r14b
  13:	0f 84 5d 19 00 00    	je     0x1976
  19:	e8 b7 23 5d fd       	call   0xfd5d23d5
  1e:	4d 8d 7c 24 08       	lea    0x8(%r12),%r15
  23:	4c 89 e0             	mov    %r12,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 0f b6 04 28       	movzbl (%rax,%r13,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 85 75 28 00 00    	jne    0x28ac
  37:	4c 89 f8             	mov    %r15,%rax
  3a:	48 c1 e8 03          	shr    $0x3,%rax
  3e:	42                   	rex.X
  3f:	0f                   	.byte 0xf

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/16 03:24 upstream 5e0497553643 efee4ed2 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci-upstream-kasan-gce-root general protection fault in bch2_opts_apply
2024/07/14 22:58 upstream 4d145e3f830b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in bch2_opts_apply
2024/07/05 17:51 upstream 661e504db04c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in bch2_opts_apply
* Struck through repros no longer work on HEAD.