kernel BUG in btrfs_free_tree_block (2)

Status: upstream: reported syz repro on 2026/07/29 07:23
Reported-by: syzbot+1e47e820a43a89a9e5e4@syzkaller.appspotmail.com
First crash: 64d, last: 11d
▶ ▼ Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in btrfs_free_tree_block btrfs -1 syz, C error 150 779d 1465d 27/29 fixed on 2024/08/14 03:44
linux-6.1 kernel BUG in btrfs_free_tree_block origin:upstream missing-backport -1 syz, C inconclusive 28 11d 1145d 0/3 upstream: reported C repro on 2023/08/12 21:44
linux-5.15 kernel BUG in btrfs_free_tree_block origin:upstream -1 syz, C error 3 586d 1186d 0/3 auto-obsoleted due to no activity on 2025/09/21 10:08

Sample crash report:
RBP: 00007f7a944e006b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7a946d0fac R14: 00007f7a946d0fa0 R15: 00007f7a946d0fa0
 </TASK>
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-tree.c:3311!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 4430 Comm: syz.0.22 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:btrfs_free_tree_block+0xb71/0xb80 fs/btrfs/extent-tree.c:3311
Code: e9 02 f9 ff ff 44 89 e1 80 e1 07 38 c1 0f 8c 07 f9 ff ff be 08 00 00 00 4c 89 e7 e8 89 4a 79 fe e9 f5 f8 ff ff e8 ff 15 34 fe <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 55 41 57 41 56 41 55
RSP: 0018:ffffc900033cf6a0 EFLAGS: 00010293
RAX: ffffffff8344fea1 RBX: 1ffff1100f2dba14 RCX: ffff88802a8bbb80
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: ffffc900033cf7f0 R08: ffffffff901f1207 R09: 1ffffffff203e240
R10: dffffc0000000000 R11: fffffbfff203e241 R12: ffff88802495b064
R13: ffff8880796dd0a0 R14: 00000000fffffff4 R15: 0000000000000001
FS:  0000555590814500(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055ad4f288350 CR3: 0000000020479000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btrfs_force_cow_block+0xc4d/0x1760 fs/btrfs/ctree.c:480
 btrfs_cow_block+0x33e/0x7d0 fs/btrfs/ctree.c:598
 btrfs_search_slot+0x9d4/0x2090 fs/btrfs/ctree.c:-1
 btrfs_insert_empty_items+0x32c/0x3e0 fs/btrfs/ctree.c:4012
 btrfs_insert_empty_item fs/btrfs/ctree.h:2957 [inline]
 insert_balance_item+0x1b5/0x16f0 fs/btrfs/volumes.c:3534
 btrfs_balance+0xb50/0x1500 fs/btrfs/volumes.c:4453
 btrfs_ioctl_balance+0x648/0x7e0 fs/btrfs/ioctl.c:4151
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f7a94449159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd8e01f928 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f7a946d0fa0 RCX: 00007f7a94449159
RDX: 0000000000000000 RSI: 00000000c4009420 RDI: 0000000000000004
RBP: 00007f7a944e006b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7a946d0fac R14: 00007f7a946d0fa0 R15: 00007f7a946d0fa0
 </TASK>
Modules linked in:
---[ end trace 1071ccc853b57a12 ]---
RIP: 0010:btrfs_free_tree_block+0xb71/0xb80 fs/btrfs/extent-tree.c:3311
Code: e9 02 f9 ff ff 44 89 e1 80 e1 07 38 c1 0f 8c 07 f9 ff ff be 08 00 00 00 4c 89 e7 e8 89 4a 79 fe e9 f5 f8 ff ff e8 ff 15 34 fe <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 55 41 57 41 56 41 55
RSP: 0018:ffffc900033cf6a0 EFLAGS: 00010293
RAX: ffffffff8344fea1 RBX: 1ffff1100f2dba14 RCX: ffff88802a8bbb80
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: ffffc900033cf7f0 R08: ffffffff901f1207 R09: 1ffffffff203e240
R10: dffffc0000000000 R11: fffffbfff203e241 R12: ffff88802495b064
R13: ffff8880796dd0a0 R14: 00000000fffffff4 R15: 0000000000000001
FS:  0000555590814500(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055ad4f288350 CR3: 0000000020479000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/20 00:31 linux-5.15.y 0248c33e835e 853b104b .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-linux-5-15-kasan kernel BUG in btrfs_free_tree_block
2026/09/19 23:29 linux-5.15.y 0248c33e835e 853b104b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan kernel BUG in btrfs_free_tree_block
2026/07/29 07:23 linux-5.15.y 674f684f7c61 19622d9d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan kernel BUG in btrfs_free_tree_block
* Struck through repros no longer work on HEAD.