syzbot


BUG: unable to handle kernel paging request in bch2_opt_to_text

Status: upstream: reported C repro on 2024/09/18 23:29
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+294f528e56138c357a48@syzkaller.appspotmail.com
First crash: 67d, last: 44d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH V2] bcachefs: Fix null-ptr-deref in bch2_opt_to_text 1 (1) 2024/09/20 12:07
[syzbot] [bcachefs?] BUG: unable to handle kernel paging request in bch2_opt_to_text 2 (4) 2024/09/20 02:37
[PATCH] bcachefs: Fix null-ptr-deref in bch2_opt_to_text 1 (1) 2024/09/19 22:55
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/10/08 01:55 1h11m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2024/09/19 15:11 1h08m eadavis@qq.com patch git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log

Sample crash report:
loop0: detected capacity change from 0 to 32768
Unable to handle kernel paging request at virtual address dfff800000000000
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
Mem abort info:
  ESR = 0x0000000096000005
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x05: level 1 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
  CM = 0, WnR = 0, TnD = 0, TagAccess = 0
  GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000000] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 UID: 0 PID: 6405 Comm: syz-executor394 Not tainted 6.11.0-rc7-syzkaller-g5f5673607153 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : strlen+0x30/0x70 lib/string.c:402
lr : prt_str fs/bcachefs/printbuf.h:230 [inline]
lr : bch2_opt_to_text+0x158/0x6b8 fs/bcachefs/opts.c:424
sp : ffff8000a38773e0
x29: ffff8000a38773e0 x28: ffff0000dce00000 x27: 1ffff00011728510
x26: dfff800000000000 x25: 0000000000000002 x24: 0000000000000002
x23: ffff0000dce00000 x22: 0000000000000000 x21: dfff800000000000
x20: 0000000000000000 x19: 0000000000000000 x18: ffff8000a3876d00
x17: 000000000000ce44 x16: ffff80008b2e26cc x15: 0000000000000001
x14: 0000000000000000 x13: 0000000000000003 x12: ffff0000cf959e40
x11: 0000000000ff0100 x10: 0000000000ff0100 x9 : 0000000000000000
x8 : 0000000000000000 x7 : ffff8000a38772e0 x6 : 000000000000003d
x5 : ffff0000c5ac126f x4 : ffff80008b945083 x3 : ffff80008b2e5714
x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
 strlen+0x30/0x70 lib/string.c:402
 prt_str fs/bcachefs/printbuf.h:230 [inline]
 bch2_opt_to_text+0x158/0x6b8 fs/bcachefs/opts.c:424
 print_mount_opts+0xbbc/0x164c fs/bcachefs/super.c:992
 bch2_fs_start+0x44/0x53c fs/bcachefs/super.c:1004
 bch2_fs_get_tree+0x938/0x1030 fs/bcachefs/fs.c:1946
 vfs_get_tree+0x90/0x28c fs/super.c:1800
 do_new_mount+0x278/0x900 fs/namespace.c:3472
 path_mount+0x590/0xe04 fs/namespace.c:3799
 do_mount fs/namespace.c:3812 [inline]
 __do_sys_mount fs/namespace.c:4020 [inline]
 __se_sys_mount fs/namespace.c:3997 [inline]
 __arm64_sys_mount+0x45c/0x5a8 fs/namespace.c:3997
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598
Code: f2fbfff5 8b140260 d343fc08 12000809 (38f56908) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	f2fbfff5 	movk	x21, #0xdfff, lsl #48
   4:	8b140260 	add	x0, x19, x20
   8:	d343fc08 	lsr	x8, x0, #3
   c:	12000809 	and	w9, w0, #0x7
* 10:	38f56908 	ldrsb	w8, [x8, x21] <-- trapping instruction

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/15 00:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 ff60e2ca .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_opt_to_text
2024/09/23 22:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in bch2_opt_to_text
2024/09/14 23:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 ff60e2ca .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in bch2_opt_to_text
* Struck through repros no longer work on HEAD.