syzbot


KASAN: null-ptr-deref Write in __bch2_trans_get

Status: moderation: reported on 2025/02/17 07:54
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+4b29a3ec4245f1a57b79@syzkaller.appspotmail.com
First crash: 4d17h, last: 4d17h
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel paging request in __bch2_trans_get bcachefs 1 157d 146d 0/28 auto-obsoleted due to no activity on 2024/12/26 04:05

Sample crash report:
bcachefs (loop2): accounting_read... done
bcachefs (loop2): alloc_read... done
bcachefs (loop2): stripes_read...
==================================================================
BUG: KASAN: null-ptr-deref in __bch2_trans_get+0xcd/0xd30 fs/bcachefs/btree_iter.c:3339
Write of size 360 at addr 0000000000000003 by task syz.2.144/6972

CPU: 0 UID: 0 PID: 6972 Comm: syz.2.144 Not tainted 6.14.0-rc2-syzkaller-00303-gad1b832bf1cf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_report+0xe8/0x550 mm/kasan/report.c:492
 kasan_report+0x143/0x180 mm/kasan/report.c:602
 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189
 __asan_memset+0x23/0x50 mm/kasan/shadow.c:84
 __bch2_trans_get+0xcd/0xd30 fs/bcachefs/btree_iter.c:3339
 bch2_stripes_read+0xdf/0xb00 fs/bcachefs/ec.c:2370
 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:226
 bch2_run_recovery_passes+0x2ad/0xa90 fs/bcachefs/recovery_passes.c:291
 bch2_fs_recovery+0x265a/0x3de0 fs/bcachefs/recovery.c:936
 bch2_fs_start+0x37c/0x610 fs/bcachefs/super.c:1041
 bch2_fs_get_tree+0xdb7/0x17a0 fs/bcachefs/fs.c:2203
 vfs_get_tree+0x90/0x2b0 fs/super.c:1814
 do_new_mount+0x2be/0xb40 fs/namespace.c:3560
 do_mount fs/namespace.c:3900 [inline]
 __do_sys_mount fs/namespace.c:4111 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4088
 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:0x7f9cb778e58a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 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:00007f9cb86bee68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f9cb86beef0 RCX: 00007f9cb778e58a
RDX: 00004000000058c0 RSI: 0000400000005900 RDI: 00007f9cb86beeb0
RBP: 00004000000058c0 R08: 00007f9cb86beef0 R09: 0000000000810c06
R10: 0000000000810c06 R11: 0000000000000246 R12: 0000400000005900
R13: 00007f9cb86beeb0 R14: 000000000000591f R15: 0000400000000240
 </TASK>
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/16 10:51 upstream ad1b832bf1cf 40a34ec9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in __bch2_trans_get
* Struck through repros no longer work on HEAD.