syzbot


kernel BUG in bch2_fs_recovery

Status: fixed on 2024/06/10 15:49
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+05c1843ef85da9e52042@syzkaller.appspotmail.com
Fix commit: 7ffec9ccdc6a bcachefs: don't free error pointers
First crash: 41d, last: 36d
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: kernel BUG in bch2_bkey_ptrs_to_text (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 7ffec9ccdc6ad8356792f9a7823b1fe9c8a10cbf
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Fri May 3 14:55:17 2024 +0000

  bcachefs: don't free error pointers

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_fs_recovery 1 (4) 2024/06/09 13:30
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/05/23 10:34 33m retest repro upstream OK log
2024/05/23 10:29 22m retest repro upstream OK log

Sample crash report:
  u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq afc6cc17f332ffe0 written 24 min_key POS_MIN durability: 0 (invalid extent entry 0000000000020040)
  invalid extent entry type (got 6, max 6), shutting down
bcachefs (loop0): inconsistency detected - emergency read only at journal seq 0
------------[ cut here ]------------
kernel BUG at arch/x86/mm/physaddr.c:23!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 PID: 5070 Comm: syz-executor363 Not tainted 6.9.0-rc6-syzkaller-00232-gddb4c3f25b7b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:__phys_addr+0x16a/0x170 arch/x86/mm/physaddr.c:23
Code: c0 75 1a 8e 4c 89 f6 4c 89 fa e8 21 d6 9d 03 e9 45 ff ff ff e8 77 60 53 00 90 0f 0b e8 6f 60 53 00 90 0f 0b e8 67 60 53 00 90 <0f> 0b 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc900020ef198 EFLAGS: 00010293
RAX: ffffffff8142af69 RBX: 000000007ffff75e RCX: ffff88802215da00
RDX: 0000000000000000 RSI: 000000007ffff75e RDI: 000000001fffffff
RBP: ffffc900020ef5c8 R08: ffffffff8142af05 R09: 0000000000000000
R10: ffff8880794cafe0 R11: ffffed100f2995ff R12: dffffc0000000000
R13: fffffffffffff75e R14: 000000007ffff75e R15: ffff888079480000
FS:  000055556b0ef380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc70da4e98 CR3: 0000000075a4c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 virt_to_folio include/linux/mm.h:1306 [inline]
 kfree+0x71/0x3a0 mm/slub.c:4382
 bch2_fs_recovery+0x3166/0x6390 fs/bcachefs/recovery.c:905
 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1043
 bch2_fs_open+0xa8d/0xdf0 fs/bcachefs/super.c:2102
 bch2_mount+0x71d/0x1320 fs/bcachefs/fs.c:1903
 legacy_get_tree+0xee/0x190 fs/fs_context.c:662
 vfs_get_tree+0x90/0x2a0 fs/super.c:1779
 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+0xf5/0x240 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f00ce7f78fa
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:00007ffcea0cd8d8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffcea0cd8f0 RCX: 00007f00ce7f78fa
RDX: 0000000020011a00 RSI: 0000000020000080 RDI: 00007ffcea0cd8f0
RBP: 0000000000000004 R08: 00007ffcea0cd930 R09: 00000000000119fd
R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000
R13: 00007ffcea0cd930 R14: 0000000000000003 R15: 0000000001000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__phys_addr+0x16a/0x170 arch/x86/mm/physaddr.c:23
Code: c0 75 1a 8e 4c 89 f6 4c 89 fa e8 21 d6 9d 03 e9 45 ff ff ff e8 77 60 53 00 90 0f 0b e8 6f 60 53 00 90 0f 0b e8 67 60 53 00 90 <0f> 0b 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc900020ef198 EFLAGS: 00010293
RAX: ffffffff8142af69 RBX: 000000007ffff75e RCX: ffff88802215da00
RDX: 0000000000000000 RSI: 000000007ffff75e RDI: 000000001fffffff
RBP: ffffc900020ef5c8 R08: ffffffff8142af05 R09: 0000000000000000
R10: ffff8880794cafe0 R11: ffffed100f2995ff R12: dffffc0000000000
R13: fffffffffffff75e R14: 000000007ffff75e R15: ffff888079480000
FS:  000055556b0ef380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc70da4e98 CR3: 0000000075a4c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (161):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/04 03:41 upstream ddb4c3f25b7b 610f2a54 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/03 21:08 upstream 3d25a941ea50 610f2a54 .config console log report syz C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-qemu-upstream kernel BUG in bch2_fs_recovery
2024/05/09 10:27 upstream 6d7ddd805123 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_fs_recovery
2024/05/09 07:08 upstream 6d7ddd805123 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in bch2_fs_recovery
2024/05/09 05:51 upstream 6d7ddd805123 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_fs_recovery
2024/05/09 03:54 upstream 6d7ddd805123 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/08 22:34 upstream 6d7ddd805123 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/08 18:34 upstream dccb07f2914c 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in bch2_fs_recovery
2024/05/08 14:12 upstream dccb07f2914c 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/08 13:08 upstream dccb07f2914c 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in bch2_fs_recovery
2024/05/08 12:59 upstream dccb07f2914c 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/08 06:14 upstream dccb07f2914c 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in bch2_fs_recovery
2024/05/07 23:46 upstream dccb07f2914c cb2dcc0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/07 22:21 upstream dccb07f2914c cb2dcc0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/07 21:14 upstream dccb07f2914c cb2dcc0e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_fs_recovery
2024/05/07 20:03 upstream dccb07f2914c cb2dcc0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/07 18:27 upstream dccb07f2914c cb2dcc0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/07 11:13 upstream dccb07f2914c fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/07 10:03 upstream dccb07f2914c fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/07 08:29 upstream dccb07f2914c fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/07 02:11 upstream dccb07f2914c fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/07 00:55 upstream dd5a440a31fa c035c6de .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in bch2_fs_recovery
2024/05/06 20:30 upstream dd5a440a31fa d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/06 14:35 upstream dd5a440a31fa d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/06 06:23 upstream b9158815de52 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in bch2_fs_recovery
2024/05/06 05:52 upstream b9158815de52 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root kernel BUG in bch2_fs_recovery
2024/05/06 04:42 upstream b9158815de52 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in bch2_fs_recovery
2024/05/05 14:07 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root kernel BUG in bch2_fs_recovery
2024/05/05 13:06 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_fs_recovery
2024/05/05 12:05 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_fs_recovery
2024/05/05 12:05 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in bch2_fs_recovery
2024/05/05 11:04 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in bch2_fs_recovery
2024/05/05 10:01 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in bch2_fs_recovery
2024/05/05 08:53 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_fs_recovery
2024/05/09 09:59 upstream 6d7ddd805123 20bf80e1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in bch2_fs_recovery
2024/05/08 15:25 upstream dccb07f2914c 9473be88 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in bch2_fs_recovery
2024/05/08 09:29 upstream dccb07f2914c 4cf3f9b3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in bch2_fs_recovery
2024/05/08 04:37 upstream dccb07f2914c 4cf3f9b3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in bch2_fs_recovery
2024/05/06 17:50 upstream dd5a440a31fa d884b519 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in bch2_fs_recovery
2024/05/06 02:01 upstream b9158815de52 610f2a54 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in bch2_fs_recovery
2024/05/05 16:09 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in bch2_fs_recovery
2024/05/09 08:38 upstream 6d7ddd805123 20bf80e1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in bch2_fs_recovery
2024/05/08 07:16 upstream dccb07f2914c 4cf3f9b3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in bch2_fs_recovery
2024/05/07 13:26 upstream dccb07f2914c cb2dcc0e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in bch2_fs_recovery
2024/05/07 06:09 upstream ee5b455b0ada fa7a5cf0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in bch2_fs_recovery
2024/05/06 16:17 upstream dd5a440a31fa d884b519 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in bch2_fs_recovery
2024/05/06 12:44 upstream dd5a440a31fa d884b519 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in bch2_fs_recovery
2024/05/05 14:50 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in bch2_fs_recovery
2024/05/06 03:06 linux-next 9221b2819b8a 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in bch2_fs_recovery
2024/05/06 00:01 linux-next 9221b2819b8a 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in bch2_fs_recovery
* Struck through repros no longer work on HEAD.