kernel BUG in btrfs_assert_inode_range_clean

Status: upstream: reported on 2026/08/12 00:11
Subsystems: btrfs
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+d6b4e882f299b4de30e1@syzkaller.appspotmail.com
First crash: 6d07h, last: 5d11h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
5fe4f161 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ kernel BUG in btrfs_assert_inode_range_clean 2026/08/09 02:30 2026/08/09 02:30 2026/08/09 03:33 5d63f80b
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] kernel BUG in btrfs_assert_inode_range_clean 0 (1) 2026/08/12 00:11

Sample crash report:
loop0: detected capacity change from 0 to 32768
BTRFS: device fsid 14d642db-7b15-43e4-81e6-4b8fac6a25f8 devid 1 transid 8 /dev/loop0 (7:0) scanned by syz.0.0 (5319)
BTRFS info (device loop0): first mount of filesystem 14d642db-7b15-43e4-81e6-4b8fac6a25f8
BTRFS info (device loop0): using blake2b checksum algorithm
BTRFS info (device loop0): enabling ssd optimizations
BTRFS info (device loop0): turning on async discard
BTRFS info (device loop0): enabling free space tree
BTRFS info (device loop0): use zstd compression, level 3
BTRFS error (device loop0): found unexpected ordered extent in file range [0, 6295551] for inode 263 root 5 (ordered range [131072, 262143])
assertion failed: ordered == NULL, in fs/btrfs/inode.c:10662
------------[ cut here ]------------
kernel BUG at fs/btrfs/inode.c:10662!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:btrfs_assert_inode_range_clean+0x2cf/0x320 fs/btrfs/inode.c:10662
Code: fd 48 8b 3c 24 e8 11 8b 04 00 48 c7 c7 c0 27 38 8c 48 c7 c6 a0 40 38 8c 48 c7 c2 a0 28 38 8c b9 a6 29 00 00 e8 62 9c 13 fd 90 <0f> 0b 89 d9 80 e1 07 38 c1 0f 8c b8 fe ff ff be 08 00 00 00 48 89
RSP: 0018:ffffc9000f186f28 EFLAGS: 00010246
RAX: 000000000000003c RBX: 0000000000000001 RCX: 67b6815a688fe000
RDX: ffffc9000e8ca000 RSI: 00000000000057ab RDI: 00000000000057ac
RBP: 0000000000020000 R08: ffffc9000f186ca7 R09: 1ffff92001e30d94
R10: dffffc0000000000 R11: fffff52001e30d95 R12: 0000000000000000
R13: 0000000000000005 R14: dffffc0000000000 R15: 0000000000600fff
FS:  00007f0a019ce6c0(0000) GS:ffff88808c54a000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f817db41000 CR3: 0000000043099000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 btrfs_punch_hole_lock_range+0x521/0x5b0 fs/btrfs/file.c:2291
 btrfs_punch_hole fs/btrfs/file.c:2756 [inline]
 btrfs_fallocate+0x17a8/0x1c30 fs/btrfs/file.c:3128
 vfs_fallocate+0x65a/0x7e0 fs/open.c:338
 madvise_remove mm/madvise.c:1038 [inline]
 madvise_vma_behavior+0x2c07/0x4340 mm/madvise.c:1351
 madvise_walk_vmas+0x576/0xb00 mm/madvise.c:1712
 madvise_do_behavior+0x385/0x540 mm/madvise.c:1907
 do_madvise+0x327/0x3a0 mm/madvise.c:2005
 __do_sys_madvise mm/madvise.c:2014 [inline]
 __se_sys_madvise mm/madvise.c:2012 [inline]
 __x64_sys_madvise+0xa6/0xc0 mm/madvise.c:2012
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0a00b9e0d9
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:00007f0a019cdfe8 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
RAX: ffffffffffffffda RBX: 00007f0a00e25fa0 RCX: 00007f0a00b9e0d9
RDX: 0000000000000009 RSI: 0000000000600003 RDI: 0000200000000000
RBP: 00007f0a00c35024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0a00e26038 R14: 00007f0a00e25fa0 R15: 00007ffe34d18798
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btrfs_assert_inode_range_clean+0x2cf/0x320 fs/btrfs/inode.c:10662
Code: fd 48 8b 3c 24 e8 11 8b 04 00 48 c7 c7 c0 27 38 8c 48 c7 c6 a0 40 38 8c 48 c7 c2 a0 28 38 8c b9 a6 29 00 00 e8 62 9c 13 fd 90 <0f> 0b 89 d9 80 e1 07 38 c1 0f 8c b8 fe ff ff be 08 00 00 00 48 89
RSP: 0018:ffffc9000f186f28 EFLAGS: 00010246
RAX: 000000000000003c RBX: 0000000000000001 RCX: 67b6815a688fe000
RDX: ffffc9000e8ca000 RSI: 00000000000057ab RDI: 00000000000057ac
RBP: 0000000000020000 R08: ffffc9000f186ca7 R09: 1ffff92001e30d94
R10: dffffc0000000000 R11: fffff52001e30d95 R12: 0000000000000000
R13: 0000000000000005 R14: dffffc0000000000 R15: 0000000000600fff
FS:  00007f0a019ce6c0(0000) GS:ffff88808c54a000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0a019ad9a0 CR3: 0000000043099000 CR4: 0000000000352ef0

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/07 18:09 upstream f9a2394a2348 e4ef95d6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in btrfs_assert_inode_range_clean
2026/08/07 18:09 upstream f9a2394a2348 e4ef95d6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in btrfs_assert_inode_range_clean
2026/08/06 21:31 upstream fcaeecb8b0cd cc56899a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in btrfs_assert_inode_range_clean
* Struck through repros no longer work on HEAD.