syzbot


BUG: unable to handle kernel paging request in bch2_dirent_to_text

Status: upstream: reported C repro on 2024/07/18 01:20
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+1a11884d9c9f1353942d@syzkaller.appspotmail.com
First crash: 141d, last: 91d
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: invalid opcode in corrupted (log)
Repro: C syz .config
  
Fix bisection: failed (error log, bisect log)
  
Discussions (4)
Title Replies (including bot) Last reply
[syzbot] Monthly bcachefs report (Sep 2024) 0 (1) 2024/09/13 10:03
[PATCH] bcachefs: Add check for the size of combined key and value 2 (2) 2024/08/13 12:17
[PATCH] bcachefs: Add check for the size of combined key and value 1 (1) 2024/08/04 09:20
[syzbot] [bcachefs?] BUG: unable to handle kernel paging request in bch2_dirent_to_text 0 (1) 2024/07/18 01:20
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/07/31 09:25 12m retest repro upstream report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/10/15 00:50 0m bisect fix upstream error job log
2024/09/04 18:52 3h09m bisect fix upstream OK (0) job log log

Sample crash report:
loop0: detected capacity change from 0 to 32768
BUG: unable to handle page fault for address: ffffed110a6e4959
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 23ffee067 P4D 23ffee067 PUD 0 
Oops: Oops: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 PID: 5092 Comm: syz-executor341 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:bch2_dirent_name_bytes fs/bcachefs/dirent.c:23 [inline]
RIP: 0010:bch2_dirent_get_name fs/bcachefs/dirent.c:37 [inline]
RIP: 0010:bch2_dirent_to_text+0xba/0x2f0 fs/bcachefs/dirent.c:153
Code: bf 09 00 00 00 48 89 de e8 03 ce 78 fd 48 83 fb 08 77 09 e8 18 c9 78 fd 31 d2 eb 53 8d 45 fa 49 8d 1c c4 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 e7 4e db fd c1 e5 03 48 8b 1b 31
RSP: 0018:ffffc90002d3ed90 EFLAGS: 00010a06
RAX: 1ffff1110a6e4959 RBX: ffff888853724ac8 RCX: ffff888026263c00
RDX: 0000000000000000 RSI: ffffffffffffffd8 RDI: 0000000000000009
RBP: 0000000000000000 R08: ffffffff841d92fd R09: 0000000000000020
R10: dffffc0000000000 R11: ffffffff841d9260 R12: ffff888053724af8
R13: dffffc0000000000 R14: ffffc90002d3f540 R15: ffff888053724ad2
FS:  0000555572e1d380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed110a6e4959 CR3: 00000000795e8000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 journal_entry_btree_keys_to_text+0x1d7/0x390 fs/bcachefs/journal_io.c:439
 bch2_sb_clean_to_text+0x138/0x240 fs/bcachefs/sb-clean.c:313
 bch2_sb_field_validate+0x201/0x2e0 fs/bcachefs/super-io.c:1229
 bch2_sb_validate+0xa69/0xe00 fs/bcachefs/super-io.c:468
 __bch2_read_super+0xc1b/0x1370 fs/bcachefs/super-io.c:823
 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:0x7f28ce8ed0aa
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:00007ffe11d678d8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe11d678f0 RCX: 00007f28ce8ed0aa
RDX: 0000000020011a00 RSI: 0000000020000000 RDI: 00007ffe11d678f0
RBP: 0000000000000004 R08: 00007ffe11d67930 R09: 00000000000119f7
R10: 0000000001200014 R11: 0000000000000282 R12: 0000000001200014
R13: 00007ffe11d67930 R14: 0000000000000003 R15: 0000000001000000
 </TASK>
Modules linked in:
CR2: ffffed110a6e4959
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_dirent_name_bytes fs/bcachefs/dirent.c:23 [inline]
RIP: 0010:bch2_dirent_get_name fs/bcachefs/dirent.c:37 [inline]
RIP: 0010:bch2_dirent_to_text+0xba/0x2f0 fs/bcachefs/dirent.c:153
Code: bf 09 00 00 00 48 89 de e8 03 ce 78 fd 48 83 fb 08 77 09 e8 18 c9 78 fd 31 d2 eb 53 8d 45 fa 49 8d 1c c4 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 e7 4e db fd c1 e5 03 48 8b 1b 31
RSP: 0018:ffffc90002d3ed90 EFLAGS: 00010a06
RAX: 1ffff1110a6e4959 RBX: ffff888853724ac8 RCX: ffff888026263c00
RDX: 0000000000000000 RSI: ffffffffffffffd8 RDI: 0000000000000009
RBP: 0000000000000000 R08: ffffffff841d92fd R09: 0000000000000020
R10: dffffc0000000000 R11: ffffffff841d9260 R12: ffff888053724af8
R13: dffffc0000000000 R14: ffffc90002d3f540 R15: ffff888053724ad2
FS:  0000555572e1d380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed110a6e4959 CR3: 00000000795e8000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	bf 09 00 00 00       	mov    $0x9,%edi
   5:	48 89 de             	mov    %rbx,%rsi
   8:	e8 03 ce 78 fd       	call   0xfd78ce10
   d:	48 83 fb 08          	cmp    $0x8,%rbx
  11:	77 09                	ja     0x1c
  13:	e8 18 c9 78 fd       	call   0xfd78c930
  18:	31 d2                	xor    %edx,%edx
  1a:	eb 53                	jmp    0x6f
  1c:	8d 45 fa             	lea    -0x6(%rbp),%eax
  1f:	49 8d 1c c4          	lea    (%r12,%rax,8),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 e7 4e db fd       	call   0xfddb4f20
  39:	c1 e5 03             	shl    $0x3,%ebp
  3c:	48 8b 1b             	mov    (%rbx),%rbx
  3f:	31                   	.byte 0x31

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/17 09:09 upstream 0434dbe32053 215bec2d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs BUG: unable to handle kernel paging request in bch2_dirent_to_text
2024/07/17 08:00 upstream 0434dbe32053 215bec2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs BUG: unable to handle kernel paging request in bch2_dirent_to_text
* Struck through repros no longer work on HEAD.