syzbot


general protection fault in bch2_checksum

Status: upstream: reported C repro on 2024/07/17 13:39
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+dd3d9835055dacb66f35@syzkaller.appspotmail.com
Fix commit: bcachefs: cryptographic MACs on superblock are not (yet?) supported
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 156d, last: 19h06m
Cause bisection: introduced by (bisect log) :
commit 03ef80b469d5d83530ce1ce15be78a40e5300f9b
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Sat Sep 23 22:41:51 2023 +0000

  bcachefs: Ignore unknown mount options

Crash: BUG: unable to handle kernel paging request in bch2_checksum (log)
Repro: C syz .config
  
Discussions (4)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] general protection fault in bch2_checksum 0 (3) 2024/11/28 22:59
[syzbot] Monthly bcachefs report (Sep 2024) 0 (1) 2024/09/13 10:03
[PATCH] bcachefs: Fix general protection fault in bch2_checksum 1 (1) 2024/07/17 21:56
Re: [syzbot] [PATCH] Fix general protection fault in bch2_checksum 0 (1) 2024/07/17 20:43
Last patch testing requests (4)
Created Duration User Patch Repo Result
2024/10/13 03:20 14m retest repro upstream report log
2024/09/21 09:18 20m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2024/07/31 14:17 13m retest repro upstream report log
2024/07/17 20:43 21m cam.alvarez.i@gmail.com patch upstream OK log

Sample crash report:
loop0: detected capacity change from 0 to 32768
Oops: general protection fault, probably for non-canonical address 0xdffffc000000900d: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: probably user-memory-access in range [0x0000000000048068-0x000000000004806f]
CPU: 0 PID: 5080 Comm: syz-executor457 Not tainted 6.10.0-syzkaller-02711-g0434dbe32053 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:gen_poly_key fs/bcachefs/checksum.c:191 [inline]
RIP: 0010:bch2_checksum+0x1c5/0x770 fs/bcachefs/checksum.c:227
Code: f6 e8 3f c5 dc fd 48 8b 44 24 28 4c 8d b0 68 80 04 00 ba 20 00 00 00 48 8d 7c 24 60 31 f6 e8 22 c5 dc fd 4c 89 f0 48 c1 e8 03 <42> 80 3c 28 00 74 08 4c 89 f7 e8 3c c2 dc fd 49 8b 3e 48 b8 00 00
RSP: 0018:ffffc90003536d40 EFLAGS: 00010202
RAX: 000000000000900d RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc90003536dc0
RBP: ffffc900035370b0 R08: ffffc90003536dbf R09: 0000000000000000
R10: ffffc90003536da0 R11: fffff520006a6db8 R12: ffffc90003536de0
R13: dffffc0000000000 R14: 0000000000048068 R15: 1ffff920006a6db0
FS:  000055558465b380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005568164b48e0 CR3: 0000000020ce4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 read_one_super+0xd87/0xf40 fs/bcachefs/super-io.c:673
 __bch2_read_super+0x873/0x1370 fs/bcachefs/super-io.c:751
 bch2_fs_open+0x246/0xdf0 fs/bcachefs/super.c:2082
 bch2_mount+0x6b0/0x13c0 fs/bcachefs/fs.c:1931
 legacy_get_tree+0xee/0x190 fs/fs_context.c:662
 vfs_get_tree+0x90/0x2a0 fs/super.c:1789
 do_new_mount+0x2be/0xb40 fs/namespace.c:3472
 do_mount fs/namespace.c:3812 [inline]
 __do_sys_mount fs/namespace.c:4020 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3997
 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:0x7feb9e3d106a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd63a40f78 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffd63a40f90 RCX: 00007feb9e3d106a
RDX: 0000000020005b00 RSI: 0000000020000040 RDI: 00007ffd63a40f90
RBP: 0000000000000004 R08: 00007ffd63a40fd0 R09: 0000000000005b4e
R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000
R13: 00007ffd63a40fd0 R14: 0000000000000003 R15: 0000000001000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:gen_poly_key fs/bcachefs/checksum.c:191 [inline]
RIP: 0010:bch2_checksum+0x1c5/0x770 fs/bcachefs/checksum.c:227
Code: f6 e8 3f c5 dc fd 48 8b 44 24 28 4c 8d b0 68 80 04 00 ba 20 00 00 00 48 8d 7c 24 60 31 f6 e8 22 c5 dc fd 4c 89 f0 48 c1 e8 03 <42> 80 3c 28 00 74 08 4c 89 f7 e8 3c c2 dc fd 49 8b 3e 48 b8 00 00
RSP: 0018:ffffc90003536d40 EFLAGS: 00010202
RAX: 000000000000900d RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc90003536dc0
RBP: ffffc900035370b0 R08: ffffc90003536dbf R09: 0000000000000000
R10: ffffc90003536da0 R11: fffff520006a6db8 R12: ffffc90003536de0
R13: dffffc0000000000 R14: 0000000000048068 R15: 1ffff920006a6db0
FS:  000055558465b380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005568163d0fb0 CR3: 0000000020ce4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	e8 3f c5 dc fd       	call   0xfddcc544
   5:	48 8b 44 24 28       	mov    0x28(%rsp),%rax
   a:	4c 8d b0 68 80 04 00 	lea    0x48068(%rax),%r14
  11:	ba 20 00 00 00       	mov    $0x20,%edx
  16:	48 8d 7c 24 60       	lea    0x60(%rsp),%rdi
  1b:	31 f6                	xor    %esi,%esi
  1d:	e8 22 c5 dc fd       	call   0xfddcc544
  22:	4c 89 f0             	mov    %r14,%rax
  25:	48 c1 e8 03          	shr    $0x3,%rax
* 29:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	4c 89 f7             	mov    %r14,%rdi
  33:	e8 3c c2 dc fd       	call   0xfddcc274
  38:	49 8b 3e             	mov    (%r14),%rdi
  3b:	48                   	rex.W
  3c:	b8                   	.byte 0xb8

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/17 13:38 upstream 0434dbe32053 215bec2d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs general protection fault in bch2_checksum
2024/08/27 08:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci be6d853c7631 9aee4e0b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in bch2_checksum
2024/11/30 08:20 upstream 509f806f7f70 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in bch2_checksum
2024/11/24 11:13 upstream 9f16d5e6f220 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in bch2_checksum
2024/07/17 12:38 upstream 0434dbe32053 215bec2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in bch2_checksum
2024/07/05 12:58 upstream 661e504db04c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in bch2_checksum
2024/12/08 12:22 upstream 7503345ac5f5 9ac0fdc6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bch2_checksum
2024/12/08 06:12 upstream 7503345ac5f5 9ac0fdc6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bch2_checksum
2024/11/23 20:40 upstream 228a1157fb9f 68da6d95 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bch2_checksum
2024/10/24 00:34 upstream c2ee9f594da8 15fa2979 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bch2_checksum
2024/09/07 09:06 upstream b31c44928842 9750182a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bch2_checksum
2024/12/07 06:40 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7b1d1d4cfac0 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in bch2_checksum
* Struck through repros no longer work on HEAD.