syzbot


kernel BUG in bch2_fill_extent (2)

Status: upstream: reported on 2025/07/15 07:40
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+397f6fe952a0defb9424@syzkaller.appspotmail.com
Fix commit: bcachefs: Fix unhandled key type in fiemap_fill_extent
Patched on: [], 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-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci-upstream-rust-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 11d, last: 11d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_fill_extent (2) 1 (2) 2025/07/19 18:38
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in bch2_fill_extent bcachefs -1 8 64d 83d 29/29 fixed on 2025/07/10 09:09

Sample crash report:
netlink: 'syz.0.0': attribute type 1 has an invalid length.
bcachefs (loop0): /file3 offset 0: key_type_error
  u64s 5 type error 536870913:24:U32_MAX len 24 ver 0
------------[ cut here ]------------
kernel BUG at fs/bcachefs/fs.c:1323!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5339 Comm: syz.0.0 Not tainted 6.16.0-rc5-syzkaller-00121-gbc9ff192a6c9 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:bch2_fill_extent+0x96e/0x970 fs/bcachefs/fs.c:1323
Code: 0f 0b e8 75 7a 86 fd 90 0f 0b e8 6d 7a 86 fd e9 f7 fe ff ff e8 63 7a 86 fd 90 0f 0b e8 5b 7a 86 fd 90 0f 0b e8 53 7a 86 fd 90 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 55 41 57 41
RSP: 0018:ffffc9000d4af520 EFLAGS: 00010293
RAX: ffffffff8439bc1d RBX: 0000000000000014 RCX: ffff88803310c880
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000007
RBP: 0000000000000001 R08: ffff88803310c880 R09: 0000000000000004
R10: 0000000000000012 R11: 0000000000000000 R12: 0000000000000000
R13: ffffc9000d4af9a8 R14: 0000000000000002 R15: 0000000000000002
FS:  00007ffbb4c046c0(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5297547000 CR3: 00000000435be000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 bch2_fiemap+0x2871/0x2a90 fs/bcachefs/fs.c:1538
 ioctl_fiemap fs/ioctl.c:220 [inline]
 do_vfs_ioctl+0x16d3/0x1990 fs/ioctl.c:841
 __do_sys_ioctl fs/ioctl.c:905 [inline]
 __se_sys_ioctl+0x82/0x170 fs/ioctl.c:893
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ffbb3d8e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007ffbb4c04038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffbb3fb6080 RCX: 00007ffbb3d8e929
RDX: 0000200000000240 RSI: 00000000c020660b RDI: 0000000000000007
RBP: 00007ffbb3e10b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007ffbb3fb6080 R15: 00007ffc38ab3c78
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_fill_extent+0x96e/0x970 fs/bcachefs/fs.c:1323
Code: 0f 0b e8 75 7a 86 fd 90 0f 0b e8 6d 7a 86 fd e9 f7 fe ff ff e8 63 7a 86 fd 90 0f 0b e8 5b 7a 86 fd 90 0f 0b e8 53 7a 86 fd 90 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 55 41 57 41
RSP: 0018:ffffc9000d4af520 EFLAGS: 00010293
RAX: ffffffff8439bc1d RBX: 0000000000000014 RCX: ffff88803310c880
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000007
RBP: 0000000000000001 R08: ffff88803310c880 R09: 0000000000000004
R10: 0000000000000012 R11: 0000000000000000 R12: 0000000000000000
R13: ffffc9000d4af9a8 R14: 0000000000000002 R15: 0000000000000002
FS:  00007ffbb4c046c0(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000435be000 CR4: 0000000000352ef0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/11 07:34 upstream bc9ff192a6c9 3cda49cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_fill_extent
* Struck through repros no longer work on HEAD.